|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 ServletContextpublic int getMajorVersion()
getMajorVersion in interface ServletContextpublic int getMinorVersion()
getMinorVersion in interface ServletContextpublic 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 ServletContextMalformedURLExceptionpublic InputStream getResourceAsStream(String path)
getResource(), or
null if the resource doesn't exist.
getResourceAsStream in interface ServletContextpublic RequestDispatcher getRequestDispatcher(String param)
getRequestDispatcher in interface ServletContextpublic RequestDispatcher getNamedDispatcher(String param)
getNamedDispatcher in interface ServletContext
public Servlet getServlet(String param)
throws ServletException
getServlet in interface ServletContextServletExceptionpublic Enumeration getServlets()
getServlets in interface ServletContextpublic Enumeration getServletNames()
getServletNames in interface ServletContextpublic 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 ServletContextpublic String getRealPath(String path)
path to the context root.
getRealPath in interface ServletContextpublic String getServerInfo()
getServerInfo in interface ServletContextpublic String getInitParameter(String param)
getInitParameter in interface ServletContextpublic Enumeration getInitParameterNames()
getInitParameterNames in interface ServletContextpublic Object getAttribute(String param)
getAttribute in interface ServletContextpublic Enumeration getAttributeNames()
getAttributeNames in interface ServletContext
public void setAttribute(String name,
Object value)
setAttribute in interface ServletContextpublic void removeAttribute(String name)
removeAttribute in interface ServletContextpublic Set getResourcePaths(String param)
public String getServletContextName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||