Netscape ENTERPRISE SERVER 6.0 - PROGRAMMER GUIDE TO SERVLETS Programmer's Manual page 84

Guide to servlets
Table of Contents

Advertisement

Configuring Servlets in the Default Virtual Server
For example, if the
the server's document root directory (the default servlet directory), you can invoke
the servlet by pointing the web browser to:
http://
Enterprise Server expects all files in a registered servlet directory to be servlets. The
server treats any files in that directory that have the
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. You can map servlet directories to
virtual directories if desired. For example, you could specify that
http://poppy.example.com/products/
server_root
To register servlet directories and to specify their URL prefixes, use the Legacy
Servlets>Servlet Directory page in the Server Manager interface.
Alternatively, you can register servlet directories by adding appropriate
NameTrans
NameTrans fn="pfx2dir" from="/products"
dir="d:/netscape/server4/docs/january/products/servlets/"
name="ServletByExt"
You can invoke a servlet in a subdirectory of a registered servlet directory if you
include a package directive in the servlet code that corresponds to the path from
the registered servlet directory. For example, suppose the servlet is in the following
location, and that server_root
server_root
Include the following package directive as the first line in the Java source file:
package HelloWorld;
You can then invoke the servlet by pointing the web browser to:
http://
For information about reloading packaged servlets, see
"isModifiedCheckAggressive," on page 95.
84
Netscape Enterprise Server Programmer's Guide to Servlets • November 2001
SimpleServlet.class
your_server
/servlet/SimpleServlet
/docs/january/products/servlets/
directives to the default object in the file
/docs/servlet/
/docs/servlet/HelloWorld/HelloWorldServlet.class
your_server
/servlet/HelloWorld.HelloWorldServlet
servlet is in the
servlet
extension as servlets.
.class
invokes servlets in the directory
.
, such as:
obj.conf
is a registered servlet directory:
subdirectory of

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise server 6.0

Table of Contents