Viewers Java SDK Guide

Configuring your web application

To ensure the viewers function correctly, your web application must be properly configured. To configure your web application, you set up the directory structure, copy the crystalreportviewers115 folder into your web application, create a web.xml file, and then copy the required JAR files into the web application.

The following procedure assumes that you are creating a new web application, rather than building from an existing one. However, you can also use the directions below to modify an existing web application to add viewer functionality.

To set up your web application
  1. Create the following directory structure in the web applications directory of your web application server:
  2.    web_application_name

          WEB-INF

             lib

             classes

          crystalreportviewers115

    Note:    Replace web_application_name with the name of your web application.

    Your web application will be stored in the web_application_name directory. That is the root directory for the web application, which contains all the files that the web application needs. Your web application directory (web_application_name) must be in the main web application's directory on your web application server (for Tomcat, this directory is typically called webapps).

    The following directories contain the files that the web application needs:

  3. Copy the contents of crystalreportviewers115 (\Program Files\Business Objects\common\3.5 on Windows) into your web application's crystalreportviewers115 directory.
  4. Create a web.xml file for your web application and save it in the WEB-INF directory (or, if you are modifying an existing web application and want to add viewing capability to it, open your current web.xml file).
  5. The web.xml file must be constructed as follows for the viewers to function correctly.
  6. <?xml version="1.0" encoding="ISO-8859-1"?>

    <!DOCTYPE web-app

        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

        "http://java.sun.com/dtd/web-app_2_3.dtd">

    <web-app>

      <display-name>web_application_name</display-name>

      <context-param>

        <param-name>crystal_image_uri</param-name>

        <param-value>/web_application_name/crystalreportviewers115</param-value>

      </context-param>

    </web-app>

  7. Copy the support and library files required for your web application into the WEB-INF\lib directory. On Windows, these JAR files are in \Program Files\Business Objects\common\3.5\java\lib. On Unix systems, the JAR files are in businessobjects-root/java/lib.
  8. Also ensure that the jar files from the following directories are included: \Program Files\Business Objects\common\3.5\java\lib\external for Windows, and businessobjects-root/java/lib/external for UNIX.

    Note:    Copy the jar files from java\lib\external into WEB-INF\lib; do not copy to WEB-INF\lib\external.

    If you are using the viewers with the Java Reporting Component, the CrConfig.xml file that is in \Program Files\Business Objects\common\3.5\java\ for Windows or businessobjects-root/java/ for Unix must be copied over to your web application's WEB-INF/classes folder. The CrConfig.xml file contains configuration details for the Java Reporting Component.

    If you would like to use the Viewer Tag Library, copy the crystal-tags-reportviewer.tld file, which is located in the taglib directory, into the WEB-INF/lib folder.

    Note:    Depending on how you will deploy your web application, you may need to copy more files:



Business Objects
http://www.businessobjects.com/
Support services
http://www.businessobjects.com/services/support/
Product Documentation on the Web
http://support.businessobjects.com/documentation/