|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.webapp.ServletContextImpl
public class ServletContextImpl
Bare-bones servlet context implementation.
| Constructor Summary | |
|---|---|
ServletContextImpl()
|
|
| Method Summary | |
|---|---|
protected void |
addAttributeListener(ServletContextAttributeListener listener)
Adds the listener. |
Path |
getAppDir()
|
java.lang.Object |
getAttribute(java.lang.String name)
Returns the named attribute. |
java.util.Enumeration |
getAttributeNames()
Returns an enumeration of the attribute names. |
ServletContext |
getContext(java.lang.String uri)
Returns the servlet context for the name. |
java.lang.String |
getContextPath()
Gets the servlet context name |
java.lang.String |
getInitParameter(java.lang.String name)
Gets the init params |
java.util.Enumeration |
getInitParameterNames()
Gets the init params |
int |
getMajorVersion()
Returns the servlet major version |
java.lang.String |
getMimeType(java.lang.String uri)
Returns the mime type for the name. |
int |
getMinorVersion()
Returns the servlet minor version |
RequestDispatcher |
getNamedDispatcher(java.lang.String servletName)
Returns a dispatcher for the named servlet. |
java.lang.String |
getRealPath(java.lang.String uri)
Maps from a URI to a real path. |
RequestDispatcher |
getRequestDispatcher(java.lang.String uri)
Returns the dispatcher. |
java.net.URL |
getResource(java.lang.String name)
Returns a resource for the given uri. |
java.io.InputStream |
getResourceAsStream(java.lang.String uripath)
Returns the resource for a uripath as an input stream. |
java.util.Set |
getResourcePaths(java.lang.String prefix)
Returns an enumeration of all the resources. |
java.lang.String |
getServerInfo()
Returns the server information |
Servlet |
getServlet(java.lang.String name)
|
java.lang.String |
getServletContextName()
Gets the servlet context name |
java.util.Enumeration |
getServletNames()
|
java.util.Enumeration |
getServlets()
|
void |
log(java.lang.Exception e,
java.lang.String msg)
Deprecated. |
void |
log(java.lang.String message)
Logs a message to the error file. |
void |
log(java.lang.String message,
java.lang.Throwable e)
Error logging |
void |
removeAttribute(java.lang.String name)
Removes an attribute from the servlet context. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets an application attribute. |
void |
setDisplayName(java.lang.String name)
Sets the servlet context name |
protected void |
setInitParameter(java.lang.String name,
java.lang.String value)
Sets an init param |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServletContextImpl()
| Method Detail |
|---|
public Path getAppDir()
public void setDisplayName(java.lang.String name)
public java.lang.String getServletContextName()
getServletContextName in interface ServletContextpublic java.lang.String getContextPath()
getContextPath in interface ServletContextprotected void addAttributeListener(ServletContextAttributeListener listener)
public java.lang.String getServerInfo()
getServerInfo in interface ServletContextpublic int getMajorVersion()
getMajorVersion in interface ServletContextpublic int getMinorVersion()
getMinorVersion in interface ServletContext
protected void setInitParameter(java.lang.String name,
java.lang.String value)
public java.lang.String getInitParameter(java.lang.String name)
getInitParameter in interface ServletContextname - init parameter name
public java.util.Enumeration getInitParameterNames()
getInitParameterNames in interface ServletContextpublic java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface ServletContextname - of the attribute.
public java.util.Enumeration getAttributeNames()
getAttributeNames in interface ServletContext
public void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in interface ServletContextname - the name of the attributevalue - the value of the attributepublic void removeAttribute(java.lang.String name)
removeAttribute in interface ServletContextname - the name of the attribute to remove.public java.lang.String getRealPath(java.lang.String uri)
getRealPath in interface ServletContexturi - path relative to the application root to be translated.
public java.net.URL getResource(java.lang.String name)
throws java.net.MalformedURLException
XXX: jdk 1.1.x doesn't appear to allow creation of private URL streams.
getResource in interface ServletContextname - path relative to the application root.
java.net.MalformedURLExceptionpublic java.io.InputStream getResourceAsStream(java.lang.String uripath)
getResourceAsStream in interface ServletContextpublic java.util.Set getResourcePaths(java.lang.String prefix)
getResourcePaths in interface ServletContextpublic ServletContext getContext(java.lang.String uri)
getContext in interface ServletContexturi - path relative to the root
public java.lang.String getMimeType(java.lang.String uri)
getMimeType in interface ServletContexturi - path relative to the application root.public RequestDispatcher getRequestDispatcher(java.lang.String uri)
getRequestDispatcher in interface ServletContexturi - path relative to the app root (including query string)
for the included file.
public RequestDispatcher getNamedDispatcher(java.lang.String servletName)
getNamedDispatcher in interface ServletContextservletName - the servlet name to include or forward to.
public final void log(java.lang.String message)
log in interface ServletContextmsg - the message to log
public final void log(java.lang.Exception e,
java.lang.String msg)
log in interface ServletContext
public void log(java.lang.String message,
java.lang.Throwable e)
log in interface ServletContextmessage - message to loge - stack trace of the errorpublic Servlet getServlet(java.lang.String name)
getServlet in interface ServletContextpublic java.util.Enumeration getServletNames()
getServletNames in interface ServletContextpublic java.util.Enumeration getServlets()
getServlets in interface ServletContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||