Configuring the servlet

You must edit the web.xml file and the servlet-name.properties files to configure the viewer servlet.

About this task

The viewer servlet makes up the core server component for the IBM® Daeja™ ViewONE software suite. For IBM Daeja ViewONE Professional, the servlet is used for the server-side ViewONE Document Streaming Server Module and ViewONE Permanent Redaction Server Module. For IBM Daeja ViewONE Virtual, the servlet provides the entry point that is required for the viewer to work.

To configure the servlet, you need the following files:
web.xml

This XML file defines the location of the core servlet class files (com.ibm.dv.server.Platform).

If you are adding IBM Daeja ViewONE to an existing web application, you might already have a web.xml file. If you are creating a new web application, you might need to create the web.xml file.

servlet_name.properties
This properties file has the same name as the servlet that you are using, such as viewone.properties. You use this file to configure extended debugging output to a log file.

Procedure

To edit the configuration files:

  1. Copy all the files and directories from the daeja_install_dir/server/WEB-INF directory into the /WEB-INF directory of your web application. These files include the JAR files in the /lib directory and the lic-server.v1 or lic-server-virtual.v1 configuration file.
  2. Open the WEB-INF/web.xml file in a text editor and make sure that it contains the following lines.
    <web-app>
    ...
       <servlet>
          <servlet-name>viewone</servlet-name>
          <servlet-class>com.ibm.dv.server.Platform</servlet-class>
       </servlet>
    
      
       <servlet-mapping>
          <servlet-name>viewone</servlet-name>
          <url-pattern>/v1files/*</url-pattern>
       </servlet-mapping>
    ...
    </web-app>

    You can replace viewone with the name of your servlet. This servlet is called when a request is made to /v1files/*.

    Important: You must include the /* component in the URL-pattern mapping to enable the servlet to load the viewer files and resources that are required for the servlet to function correctly.
  3. Open the WEB-INF/servlet_name.properties file in a text editor and make sure that it contains the following lines to configure logging.
    logfile=WEB-INF/viewone.log

    The properties file name must match the servlet name that you defined in WEB-INF/web.xml. For example, name the file viewone.properties.

    If you do not already have a WEB-INF/servlet_name.properties file, you must create the file.

    You can replace viewone with the name of your servlet.

    To send log information to the standard web application server log file, use the following line to configure logging:
    logfile=<stdout>

What to do next

You can edit these files later to customize the viewer to meet your requirements.