| java.lang.Object org.cougaar.lib.web.arch.root.RootServlet
RootServlet | public class RootServlet implements Servlet(Code) | | This Servlet handles all incoming requests,
typically by delegating "/$name" requests to the local
org.cougaar.lib.web.arch.leaf.LeafServlet s or by redirecting
the client if the named agent is remote.
The following rules are used to handle requests:
- If the request path is "/" then the
welcomeServlet is used to print a friendly
welcome page.
- If the path is "/agent" then the
agentsServlet
is used.
- If the name lacks a "/$" prefix, or is "/$/", or is "/$~/",
then the request is handled as if the prefix is
"/$rootName", and the following rules are invoked.
- If the "/$name[/.*]" name is locally registered then the
request is delegated to the registered LeafServlet. The
LeafServlet in turn invokes the registered path within that
name, or complains if the path does not exist. This is the
most common case.
- If the "/$name[/.*]" name is not locally registered then the
Redirector is used to redirect the client
to the appropriate remote host, based on a nameserver
lookup.
- If the prefix is "/$~name[/.*]" and the name is locally
registered then the request is passed to the
"/$rootName" -- the "~" is interpreted as
"the home of name".
- If the prefix is "/$~name[/.*]" and the name is not locally
registered then the
Redirector is used as
noted above. -
|
destroy | public void destroy()(Code) | | |
|
|