|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.servlet.BootstrapServlet.ContextWrapper
public static class BootstrapServlet.ContextWrapper
Wrapper for the ServletContext
passed to the actual servlet.
It implements all resource-related methods using the provided context
root directory. Other calls are delegated to the wrapped context.
Constructor Summary | |
---|---|
BootstrapServlet.ContextWrapper(ServletContext context,
File contextRoot)
Builds a wrapper around an existing context, and handle all resource resolution relatively to contextRoot |
Method Summary | |
---|---|
Object |
getAttribute(String param)
|
Enumeration |
getAttributeNames()
|
ServletContext |
getContext(String param)
|
String |
getInitParameter(String param)
|
Enumeration |
getInitParameterNames()
|
int |
getMajorVersion()
|
String |
getMimeType(String param)
|
int |
getMinorVersion()
|
RequestDispatcher |
getNamedDispatcher(String param)
|
String |
getRealPath(String path)
Appends path to the context root. |
RequestDispatcher |
getRequestDispatcher(String param)
|
URL |
getResource(String path)
Returns the resource URL by appending path to the context
root. |
InputStream |
getResourceAsStream(String path)
Returns the stream for the result of getResource() , or
null if the resource doesn't exist. |
Set |
getResourcePaths(String param)
|
String |
getServerInfo()
|
Servlet |
getServlet(String param)
Deprecated. The method BootstrapServlet.ContextWrapper.getServlet(String) overrides a deprecated method from ServletContext. |
String |
getServletContextName()
|
Enumeration |
getServletNames()
Deprecated. The method BootstrapServlet.ContextWrapper.getServletNames() overrides a deprecated method from ServletContext. |
Enumeration |
getServlets()
Deprecated. The method BootstrapServlet.ContextWrapper.getServlets() overrides a deprecated method from ServletContext. |
void |
log(Exception ex,
String msg)
Deprecated. use log(String message, Throwable throwable) instead. |
void |
log(String msg)
|
void |
log(String msg,
Throwable thr)
|
void |
removeAttribute(String name)
|
void |
setAttribute(String name,
Object value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BootstrapServlet.ContextWrapper(ServletContext context, File contextRoot)
contextRoot
Method Detail |
---|
public ServletContext getContext(String param)
getContext
in interface ServletContext
public int getMajorVersion()
getMajorVersion
in interface ServletContext
public int getMinorVersion()
getMinorVersion
in interface ServletContext
public String getMimeType(String param)
getMimeType
in interface ServletContext
public URL getResource(String path) throws MalformedURLException
path
to the context
root. If this doesn't point to an existing file, null
is
returned.
getResource
in interface ServletContext
MalformedURLException
public InputStream getResourceAsStream(String path)
getResource()
, or
null
if the resource doesn't exist.
getResourceAsStream
in interface ServletContext
public RequestDispatcher getRequestDispatcher(String param)
getRequestDispatcher
in interface ServletContext
public RequestDispatcher getNamedDispatcher(String param)
getNamedDispatcher
in interface ServletContext
public Servlet getServlet(String param) throws ServletException
getServlet
in interface ServletContext
ServletException
public Enumeration getServlets()
getServlets
in interface ServletContext
public Enumeration getServletNames()
getServletNames
in interface ServletContext
public void log(String msg)
log
in interface ServletContext
public void log(Exception ex, String msg)
log(String message, Throwable throwable)
instead.
log
in interface ServletContext
public void log(String msg, Throwable thr)
log
in interface ServletContext
public String getRealPath(String path)
path
to the context root.
getRealPath
in interface ServletContext
public String getServerInfo()
getServerInfo
in interface ServletContext
public String getInitParameter(String param)
getInitParameter
in interface ServletContext
public Enumeration getInitParameterNames()
getInitParameterNames
in interface ServletContext
public Object getAttribute(String param)
getAttribute
in interface ServletContext
public Enumeration getAttributeNames()
getAttributeNames
in interface ServletContext
public void setAttribute(String name, Object value)
setAttribute
in interface ServletContext
public void removeAttribute(String name)
removeAttribute
in interface ServletContext
public Set getResourcePaths(String param)
public String getServletContextName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |