|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServletHost
Interface implemented by host environments that allow Servlets to be registered.
This interface allows a system service to register a Servlet to handle inbound requests.
Method Summary | |
---|---|
void |
addServletMapping(java.lang.String uri,
Servlet servlet)
Add a mapping for an instance of a Servlet. |
java.lang.String |
getContextPath()
Returns the portion of the request URI that indicates the context of the request |
int |
getDefaultPort()
Returns the default port for the server. |
RequestDispatcher |
getRequestDispatcher(java.lang.String uri)
Returns a Servlet request dispatcher for the Servlet mapped to the specified URI. |
Servlet |
getServletMapping(java.lang.String uri)
Returns the Servlet mapped to the given URI. |
java.net.URL |
getURLMapping(java.lang.String uri)
Returns the complete URL mapped to the specified URI. |
Servlet |
removeServletMapping(java.lang.String uri)
Remove a Servlet mapping. |
void |
setContextPath(java.lang.String path)
Sets the portion of the request URI that indicates the context of the request |
void |
setDefaultPort(int port)
Sets the default port for the server. |
Method Detail |
---|
void setDefaultPort(int port)
port
- the default portint getDefaultPort()
void addServletMapping(java.lang.String uri, Servlet servlet) throws ServletMappingException
uri
- the URI-mapping for the Servletservlet
- the Servlet that should be invoked
ServletMappingException
Servlet removeServletMapping(java.lang.String uri) throws ServletMappingException
uri
- the URI-mapping for the Servlet
ServletMappingException
Servlet getServletMapping(java.lang.String uri) throws ServletMappingException
uri
- the URI-mapping for the Servlet
ServletMappingException
RequestDispatcher getRequestDispatcher(java.lang.String uri) throws ServletMappingException
uri
- the URI mapped to a Servlet
ServletMappingException
java.lang.String getContextPath()
void setContextPath(java.lang.String path)
path
- the context pathjava.net.URL getURLMapping(java.lang.String uri)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |