Example: Setting up a single servlet implementation

The following example describes how to set up a single servlet implementation that accomplishes the following:

  • Manages all client connections with one multithreaded process
  • Supports up to 50 concurrent client connections
  • Allows an administrator to specify the communications ports the Service Manager implementation uses
  • Provides a simple configuration to test servlet features

You can use this example to configure the implementation depicted in the Single servlet implementation diagram.

  1. Install Service Manager on one host. For example: myserver1.
  2. Log in to the operating system of the Service Manager server host and change directories to the Service Manager RUN folder. For example:
    C:\Program Files\Micro Focus\ Service Manager\server\RUN
    
  3. Open the Service Manager configuration file (sm.cfg or smstart) in a text editor.
  4. Add the following line:
    sm -httpPort:13081 -httpsPort:13082
    
    The httpPort:13081 parameter specifies that the servlet container process listens to client connection requests on HTTP port 13081. This communications port must be unique on the host on which you start the servlet container.
    The httpsPort:13082 parameter specifies that the servlet container process listens to client connection requests on HTTPS port 13082. This communications port must be unique on the host on which you start the servlet container.
  5. Save the Service Manager configuration file.
  6. Open the Service Manager initialization file (sm.ini) in a text editor.
  7. Add the RDBMS connection settings. For example:
    [oracle10]
    sqldb:ora102
    sqllogin:sm7user/password
    sqllibrary:SQORACLE.OCI10.DLL
    sqldictionary:oracle10
    
  8. Add the following lines:
    threadsperprocess:50
    sessiontimeout:3
    
    The threadsperprocess:50 parameter defines the number of threads each process supports. A value of 50 threads assumes that the Service Manager host has the minimum recommended system memory available for servlet container processes.
    The sessiontimeout:3 parameter defines the number of minutes that the client connection can remain unresponsive before the server closes the connection. A value of 3 minutes assumes that most network latency issues are quickly and easily resolved.
  9. Save the Service Manager initialization file.
  10. Start the Service Manager server.
  11. Log in to the operating system of the Service Manager Web tier host and change directories to the Service Manager WEB-INF folder. For example:
    C:\apache-tomcat-5.5.12\webapps\sm\WEB-INF
    
  12. Open the Web configuration file (web.xml) in a text editor.
  13. Set the following parameter values:
    ParameterDefault valueDescription
    secureLogintrue

    Controls the encryption of network communication between the web application server and the web browser. Set it to false if you do not use Secure Sockets Layer (SSL) connections to the web server.

    Note: To use secure login, you must enable SSL on your web application server. For details, refer to your web application server documentation.

    sslPort8443This parameter is needed only when secureLogin is set to true. Set it to the SSL port of the web application server.
    serverHostlocalhostSpecifies the name of the Service Manager host server.
    serverPort13080Specifies the communications port number to which the Service Manager server listens.
    ...
    <context-param>
      <param-name>secureLogin</param-name>  
      <param-value>true</param-value>
    </context-param>
    <context-param>
      <param-name>sslPort</param-name>
      <param-value>8443</param-value>
    </context-param>
    ...
      <param-name>serverHost</param-name>
      <param-value>myserver1</param-value>
    </init-param>
    <init-param>
      <param-name>serverPort</param-name>
      <param-value>13080</param-value>
    </init-param>
    
  14. Save the Web configuration file.
  15. Start the Service Manager Web tier.
  16. Open Service Manager Windows clients and set the Service Manager host name and communication port values:

    FieldValue
    Server host namemyserver1
    Server port number13081

  17. Connect to the Service Manager host.

Related topics

Server implementation options
Servlet implementation
Single servlet implementation
Requirements for a single servlet implementation