
Servlet Loading
Documentation /
Administrator Docs /
Developer Docs /
Index /
Administration Contents
This document has the following sections:
For more information on loading and invoking servlets, see Loading and Invoking Servlets.
The Servlet Loading page allows you to enter, edit, or delete servlet loading
information for local or remote servlets. After you've loaded a servlet, you can
invoke it whenever you want to by:
- calling it directly using a URL.
- embedding it in a server-side include statement inside an HTML document.
- loading it automatically when the JavaServer starts up, then calling it
by means of a URL or server-side include.
Settings
The Servlet Loading page has the following two options:
Add a New Servlet
Allows you to add a new servlet to the list of servlets to be invoked.
To add a new servlet:
- Servlet Name - Enter the unique name of the servlet you are adding.
- Servlet Class - Enter the name of the Java class for the servlet.
This consists of the package name without the ".class" extension.
For example, "sun.server.http.FileServlet" is a valid class name.
Configure a Servlet
Allows you to define when the servlet is invoked, if it is a remote or
local servlet, and other information. For each servlet in the Servlets
Configure list, JavaServer displays the following information:
- Name - The unique name of the servlet.
- Description - A text string describing the servlet. This field is
sometimes blank.
- Class Name - The name of the associated class file for the servlet.
- Arguments - The servlet argument list, where each argument is in the
form "name=value".
- Load at Startup - Whether or not JavaServer loads the servlet when
the server starts.
- Loaded Now - Whether or not the servlet is currently loaded.
- Load Remotely - Whether or not JavaServer loads the servlet from a
remote location.
- Class File URL - The URL that points to the class file for the remote
servlet.
To Enter Information for a Servlet:
- In the Name field of the Add a New Servlet screen, enter a unique
name for the servlet.
- In the Class Name field of the Add a New Servlet screen, enter the
servlet's class name, which consists of the package name without
the ".class" extension. For example, "sun.server.http.FileServlet" is a
valid class name.
- In the Argument field of the Configure a Servlet screen, enter
comma-separated "name=value" pairs.
- To load the servlet when the server starts, click Yes.
(By default, servlets are only loaded when you activate them.)
- Click Save.
If the servlet is a remote servlet, do the following step in addition to
doing the above:
- In the Class Location field, enter the full URL, ending with a slash, of
the servlet's class file on the remote server. For example, if
HelloWorld.class
exists on a remote JavaServer named
nightsky.com
in the top level public_html
directory,
then the URL is http://nightsky.com/
.
Procedures
To Delete Information for a Servlet:
- Select the entry that you want to delete.
- Click Remove.
To Edit a Servlet Entry:
- Select the entry.
- Delete the entry.
- Reenter the entry.
- Click Save.
Buttons
To make changes to the Servlet Loading page and have those settings
take affect, use the three buttons at the bottom of the screen. These
are:
- Save - Writes your changes to the JavaServer and changes
the settings.
- Revert - Takes you back to the previous settings for all
fields in the screen. Use this button to undo changes you have not yet
saved.
- Load/Unload - Loads or unloads the servlet.
- Remove - Removes the servlet from the servlet list.
Top
java-server-feedback@java.sun.com