On the Servlet tab in the Server Properties window, you can disable servlet execution in a server and configure additional properties to control the execution of servlets.
Displaying the servlet execution properties
Highlight the icon for the server of interest.
Choose File | Server Properties.
Scroll the tab display at the top of the window until the Servlet tab displays, then click on it.
The Servlet tab specifies how EAServer executes servlets, as follows:
Servlet Execution Enable/Disable This option determines whether servlets can execute on a server. If the option is disabled, no installed servlets can be invoked. By default, servlet execution is enabled.
Enable Class-Name Request If this option is enabled, users can invoke a servlet by typing the name of its Java class rather than a EAServer Manager servlet name. For example:
http://yourhost:8080/servlet/com.yours.AServlet
By default, invocation by class name is allowed. You may wish to disable such access for the following reasons:
Disabling the option restricts available servlets to those that have been installed in the server’s Servlets folder in EAServer Manager.
When Servlets are invoked by class name, they are run according to the default servlet property settings. These settings may not be appropriate for some servlets.
Servlet Aliases Specifies the list of path prefixes that users can use to invoke servlets from HTTP URLs. For example, if /servlet/ is a path prefix, this URL invokes a servlet named MyServlet:
http://yourhost:8080/servlet/MyServlet
The default setting specifies /servlet/ as the only path prefix. To override the default, enter one or more prefixes, each on a line by itself. For example:
/servlet/ /servlets/
Timeout This option specifies how long the server should wait for each servlet’s init method to return. For any value, no client requests are serviced while the init method is running. Service requests that arrive while init is running are blocked until init returns. Clients receive browser timeout errors when attempting to execute the servlet while init is running. You can set the Timeout value to control how the server treats servlets if the init method is still running when you shut down the server or refresh the servlet. Table 22-2 describes the possible values.
For servlets installed in a Web application, set the Web application Timeout property described in “General properties”.
You can override this setting for individual servlets. Display the Advanced tab in the Servlet Properties window, then set the com.sybase.jaguar.servlet.init.timeout property using the syntax in Table 22-2.
Destroy Time-out EAServer calls each servlet’s destroy method before shutting down or after you have refreshed or stopped the servlet using EAServer Manager. If service calls are still active, this setting specifies the number of seconds that the server should wait for the service calls to return before calling the destroy method. The default is 0, which specifies that EAServer calls destroy immediately.
You can override the server-wide default wait-time for individual servlets. Display the Advanced tab in the Servlet Properties window, then set the com.sybase.jaguar.servlet.destroy.wait-time property to the desired number of seconds.
Copyright © 2003. Sybase Inc. All rights reserved. |
![]() |