org.mortbay.jetty.servlet
Class Context.SContext
java.lang.Object
org.mortbay.jetty.handler.ContextHandler.SContext
org.mortbay.jetty.servlet.Context.SContext
- All Implemented Interfaces:
- ServletContext
- Enclosing class:
- Context
public class Context.SContext
- extends ContextHandler.SContext
Methods inherited from class org.mortbay.jetty.handler.ContextHandler.SContext |
getAttribute, getAttributeNames, getContext, getContextHandler, getContextPath, getInitParameter, getInitParameterNames, getMajorVersion, getMimeType, getMinorVersion, getRealPath, getResource, getResourceAsStream, getResourcePaths, getServerInfo, getServlet, getServletContextName, getServletNames, getServlets, log, log, log, removeAttribute, setAttribute, toString |
Context.SContext
public Context.SContext()
getNamedDispatcher
public RequestDispatcher getNamedDispatcher(String name)
- Description copied from interface:
ServletContext
- Returns a
RequestDispatcher
object that acts
as a wrapper for the named servlet.
Servlets (and JSP pages also) may be given names via server
administration or via a web application deployment descriptor.
A servlet instance can determine its name using
ServletConfig.getServletName()
.
This method returns null
if the
ServletContext
cannot return a RequestDispatcher
for any reason.
- Specified by:
getNamedDispatcher
in interface ServletContext
- Overrides:
getNamedDispatcher
in class ContextHandler.SContext
- Parameters:
name
- a String
specifying the name
of a servlet to wrap
- Returns:
- a
RequestDispatcher
object
that acts as a wrapper for the named servlet,
or null
if the ServletContext
cannot return a RequestDispatcher
- See Also:
RequestDispatcher
,
ServletContext.getContext(java.lang.String)
,
ServletConfig.getServletName()
getRequestDispatcher
public RequestDispatcher getRequestDispatcher(String uriInContext)
- Description copied from interface:
ServletContext
- Returns a
RequestDispatcher
object that acts
as a wrapper for the resource located at the given path.
A RequestDispatcher
object can be used to forward
a request to the resource or to include the resource in a response.
The resource can be dynamic or static.
The pathname must begin with a "/" and is interpreted as relative
to the current context root. Use getContext
to obtain
a RequestDispatcher
for resources in foreign contexts.
This method returns null
if the ServletContext
cannot return a RequestDispatcher
.
- Specified by:
getRequestDispatcher
in interface ServletContext
- Overrides:
getRequestDispatcher
in class ContextHandler.SContext
- Parameters:
uriInContext
- a String
specifying the pathname
to the resource
- Returns:
- a
RequestDispatcher
object
that acts as a wrapper for the resource
at the specified path, or null
if
the ServletContext
cannot return
a RequestDispatcher
- See Also:
RequestDispatcher
,
ServletContext.getContext(java.lang.String)
Copyright © 2009 Mort Bay Consulting. All Rights Reserved.