Managing Java servlets on a Web server

A servlet is a Java program that runs on a Web server in response to a browser request. Servlets for Domino® must conform to the Java Servlet API Specification, an open standard published by Oracle.

About this task

Special properties for individual servlets can be specified in a text file called servlets.properties, which is located in the Domino® data directory. For more information about creating Java servlets and the servlets.properties file, see IBM® Domino® Designer 9.0.1 Social Edition Help.

Procedure

  1. Open the Server document you want to edit.
  2. Click the Internet Protocols > Domino Web Engine tab. Under Java Servlets complete these fields:
    Table 1. Java Servlet fields

    Field

    Action

    Java servlet support

    Choose one:

    • None (default) -- To not load the Java Virtual Machine (JVM) or the servlet manager when the HTTP task starts.
    • Domino® Servlet Manager -- To load the JVM and the servlet manager that comes with Domino®.
    • Third Party Servlet Support -- To load the JVM, but not the Domino® servlet manager. This lets you use a servlet manager other than Domino®, such as IBM® WebSphere®.

    Servlet URL path

    Enter the path in a URL that signals Domino® that the URL refers to a servlet. The default is /servlet.

    Class path

    Enter one or more paths that the Servlet Manager and JVM search to find servlets and dependent classes. The standard Java libraries installed with Domino® are automatically in the class path. This setting allows you to add additional paths. You may specify directories, JAR files, and ZIP files. Paths may be absolute or relative to the Domino® data directory. For example:

    • domino\servlet specifies files in the c:\lotus\domino\data\domino\servlet directory
    • c:\apps\myservlets specifies files in the c:\apps\myservlets directory
    • c:\javamail\mail.jar specifies the mail.jar file in the c:\javamail directory
    • domino\servlet\sql.zip specifies the sql.zip file in the c:\lotus\domino\data\domino\servlet directory

    The default is domino\servlet

    Servlet file extensions

    Enter a list of URL file extensions that signal Domino® that a URL refers to a servlet. You must map each extension to a single servlet by a directive in the servlets.properties file. The default is no extensions.

    Session state tracking

    Choose one:

    • Enabled (default) -- To have the Domino® servlet manager check periodically the user activity of all HttpSession instances. Sessions that are idle for the period of time specified in the Idle session timeout field are automatically terminated. The servlet manager calls the method HttpSession.invalidate() to inform the servlet that the session will be terminated.
    • Disabled -- Does not check for user activity.

    Domino® uses this setting and the next three settings only if the servlet uses the Java Servlet API HttpSession interface. The HttpSession interface support is completely separate from the Domino® HTTP session authentication feature.

    Idle session time-out

    Enter the amount of time in minutes the user is allowed to remain idle before the session is terminated. The default is 30 minutes.

    Maximum active sessions

    Enter the number of simultaneous active sessions allowed. The default is 1000. After this limit is reached, the sessions that have been idle the longest are terminated.

    Session persistence

    Choose one:

    • Enabled -- To save session data to a disk file called sessdata.ser in the Domino® data directory when the HTTP task exits. Domino® saves the data in the Domino® data directory in a file named sessdata.ser. Domino® reloads the session data when the HTTP task restarts. Domino® also saves objects that the servlet has bound to sessions if the objects implement the java.io.Serializable interface.
    • Disabled (default) -- Discards all session data when the HTTP task exits.
  3. If appropriate for your servlet engine, control access to the servlet by specifying who has access to the servlet files through a Web browser.