|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mortbay.HTTP.Handler.NullHandler | +--com.mortbay.HTTP.Handler.ServletHandler
ServletHandler
This handler maps requests to servlets that implement the javax.servlet.http.HttpServlet API. It is configured with a PathMap of paths to ServletHolder instances.
Interface.HttpHandler
Fields inherited from class com.mortbay.HTTP.Handler.NullHandler |
httpServer |
Constructor Summary | |
ServletHandler(PathMap servletMap)
Construct with servlet PathMap |
|
ServletHandler(java.util.Properties properties)
Construct basic auth handler. |
Method Summary | |
void |
destroy()
Destroy Handler. |
void |
handle(HttpRequest request,
HttpResponse response)
Constructor |
javax.servlet.Servlet |
servlet(java.lang.String name)
Return servlet by Name within this handler or null if no servlets |
java.util.Enumeration |
servletNames()
Return enumeration of servlet Names within this handler or null if no servlets |
void |
setProperties(java.util.Properties properties)
Configure from Properties. |
void |
setServer(HttpServer server)
Set server. |
Methods inherited from class com.mortbay.HTTP.Handler.NullHandler |
getProperties,
translate |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ServletHandler(java.util.Properties properties) throws java.io.IOException
properties
- Passed to setPropertiespublic ServletHandler(PathMap servletMap)
servletMap
- Map of servlet path to ServletHolder instancesMethod Detail |
public void setProperties(java.util.Properties properties) throws java.io.IOException
PATHS : /servlet/:/SERVLET/ # URL Paths for dynamic servlet loading CLASSPATH : ./servlets: # CLASS Paths for dynamic servlet loading AutoReloadDynamicServlets: True# Should dynamic servlets auto reload Loader : className # ServletLoader for dynamic servlets PROPERTY.key:val # Property for dynamic servlets PROPERTIES: file # File of properties for dynamic servlets PathTranslated : path # Optional prefix for getPathTranslated SERVLET.name.CLASS: className # Class of servlet SERVLET.name.CLASSPATH: path # CLASSPATH to load servlet from SERVLET.name.PATHS: /path # Servlet path SERVLET.name.CHUNK: False # Should servlet HTTP/1.1 chunk by default SERVLET.name.PROPERTY.key:val # Servlet property SERVLET.name.PROPERTIES: file # File of servlet properties SERVLET.name.Initialize: False # Initialize when loaded. SERVLET.name.AutoReload: False # Auto reload servlet. SERVLET.name.Loader: className # ServletLoader for servlet SERVLET.name.ResourceBase: uri # ResourceBase for servlet.
properties
- Configuration.public void handle(HttpRequest request, HttpResponse response) throws java.lang.Exception
request
- The HTTP requests to be handledresponse
- The HTTP response to be used.public void setServer(HttpServer server) throws java.lang.Exception
public java.util.Enumeration servletNames()
public javax.servlet.Servlet servlet(java.lang.String name)
public void destroy()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |