This document has the following sections:
The Servlet Aliases page allows you to specify the pathname mapping rules that the Java Web Server uses to invoke servlets. These rules allow you to use a shortcut URL to call a servlet from your browser, or to embed the shortcut into your files. Java Web Server servlets can be called from within HTML documents (for example, using server-side includes) or from within other Java programs.
For more information on servlets, see Introduction to Servlets and the Servlet Tutorial.
Note: In most cases, servlets can be created and removed as
needed. However, it is not a good idea to remove the
following Java Web Server system servlets: file
,
ssinclude
, cgi
, imagemap
, and
invoker
.
Settings
The Servlet Alias page has the following fields:
Alias
The alias for the servlet. The alias that you should enter is the
part of the servlet's URL that appears after
http://your_machine:port
. Suppose, for
example, that you type the alias /hi
for a servlet named
hello
. Then users could type the URL,
http://your_machine:port/hi
to invoke the servlet, instead of having to type the URL,
http://your_machine:port/servlet/hello
Servlet Invoked
The name of the servlet that will be run in response to the alias. To
continue the example shown in the description of the Alias
field, above, you would type the name of the hello servlet:
hello.
Enter the name of the servlet followed by a ? then the arguments.
Server redirects can be performed by providing arguments in this fashion to RedirectServlet. (For example, you could alias/oldlocation
to/RedirectServlet?http://www.newcompanyname.com/newinformation.)
Enter the name of each servlet, separated by commas but no spaces. (For example,
finger,snoop,date
).
A servlet chain is two or more servlets linked together so that each servlet in the chain is called in succession by the previous servlet. All of the servlets in a servlet chain can be aliased to one alias name. When a request arrives for that alias, all the servlets in the chain will be invoked.
Top java-server-feedback@java.sun.com |
Copyright © 1997
Sun Microsystems, Inc. All Rights Reserved. |