Chapter 11, Extending Your Server With Programs
273
Java Servlets and JavaServerPages (JSP)
The Enterprise Server expects all files in a registered servlet directory to be
servlets. Any files, including applets, in that directory that have the
.class
extension will be treated as servlets. The Enterprise Server does not correctly
serve other files, such as HTML files or JSPs, that reside in that directory.
The server can have multiple servlet directories, all of which must reside below
the primary document directory in the directory hierarchy. You can map servlet
directories to virtual directories if desired. For example, you could specify that
http://poppy.my_domain.com/products/
invokes servlets in the directory
server_id/docs/servlet/january/products/servlets/
.
To register servlet directories and to specify their URL prefixes (virtual or not),
use the Servlet Directory page in the Servlets tab of the Server Manager. Set the
following fields:
URL Prefix.
The prefix for accessing the directory. For example, if you want
the logical URL
http://
servername
/plans
to translate to the directory
d:/netscape/es40/docs/plans
then enter
plans
in the URL Prefix field.
Servlet Directory.
The absolute pathname to the directory to be registered as
a servlet directory, for example,
d:/netscape/es40/docs/plans
. The
Enterprise Server treats all files in the directory as servlets.
Note
By default, URLs that are redirected are always escaped. To prevent this, add
escape="no"
.
F
or example:
NameTrans fn="redirect" from="/foobar" url-prefix="index.html" escape="no"
Configuring Global Attributes
You can set some global attributes for servlets, including:
•
Servlets to run when the server starts up.
•
The Session Manager to be used by servlets.
•
The amount of time the server waits before reloading servlets if they have
changed.
To set the global attributes, use the “Configure Global Servlet Attributes” page
in the Servlets tab of the Server Manager. Set the following fields:
Summary of Contents for Netscape Enterprise Server
Page 30: ...Contacting Technical Support 30 Netscape Enterprise Server Administrator s Guide ...
Page 32: ...32 Netscape Enterprise Server Administrator s Guide ...
Page 56: ...Sending Error Information to Netscape 56 Netscape Enterprise Server Administrator s Guide ...
Page 66: ...66 Netscape Enterprise Server Administrator s Guide ...
Page 112: ...Managing a Preferred Language List 112 Netscape Enterprise Server Administrator s Guide ...
Page 158: ...158 Netscape Enterprise Server Administrator s Guide ...
Page 182: ...Using the Watchdog uxwdog Process Unix 182 Netscape Enterprise Server Administrator s Guide ...
Page 196: ...Viewing Events Windows NT 196 Netscape Enterprise Server Administrator s Guide ...
Page 218: ...Enabling the Subagent 218 Netscape Enterprise Server Administrator s Guide ...
Page 266: ...266 Netscape Enterprise Server Administrator s Guide ...
Page 302: ...Enabling WAI Services 302 Netscape Enterprise Server Administrator s Guide ...
Page 310: ...310 Netscape Enterprise Server Administrator s Guide ...
Page 446: ...Customizing the Search Interface 446 Netscape Enterprise Server Administrator s Guide ...
Page 448: ...448 Netscape Enterprise Server Administrator s Guide ...
Page 454: ...Responses 454 Netscape Enterprise Server Administrator s Guide ...
Page 464: ...Referencing ACL Files in obj conf 464 Netscape Enterprise Server Administrator s Guide ...
Page 504: ...504 Netscape Enterprise Server Administrator s Guide ...