|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.w3c.tools.resources.event.StructureChangedAdapter
|
+--org.w3c.jigsaw.servlet.JigsawServletContext
| Field Summary | |
protected static java.lang.String |
deflogfile
|
protected static java.lang.String |
logdir
|
static java.lang.String |
TEMPDIR_P
|
| Constructor Summary | |
protected |
JigsawServletContext(ResourceReference ref,
ObservableProperties props)
Create a new ServletContext. |
| Method Summary | |
protected AutoReloadServletLoader |
createNewLocalServletLoader(boolean keepold)
|
java.lang.Object |
getAttribute(java.lang.String name)
ServletContext implementation - Get an attribute value. |
java.util.Enumeration |
getAttributeNames()
|
javax.servlet.ServletContext |
getContext(java.lang.String uripath)
|
protected static java.lang.String |
getFilePath(DirectoryResource dir)
|
java.lang.String |
getInitParameter(java.lang.String name)
Returns a String containing the value of the named
context-wide initialization parameter, or null if the
parameter does not exist. |
java.util.Enumeration |
getInitParameterNames()
Returns the names of the context's initialization parameters as an Enumeration of String objects, or an
empty Enumeration if the context has no initialization
parameters. |
protected static ResourceReference |
getLocalRoot(ResourceReference rr_root,
ResourceReference ref)
|
protected AutoReloadServletLoader |
getLocalServletLoader()
Get or create a suitable LocalServletLoader instance to load that servlet. |
int |
getMajorVersion()
|
java.lang.String |
getMimeType(java.lang.String filename)
ServletContext implementation - Get the MIME type for given file. |
int |
getMinorVersion()
|
javax.servlet.RequestDispatcher |
getNamedDispatcher(java.lang.String name)
Returns a RequestDispatcher object that acts
as a wrapper for the named servlet. |
java.lang.String |
getRealPath(java.lang.String path)
ServletContext implementation - Translate a piece of path. |
protected static java.lang.String |
getRealPath(java.lang.String path,
ResourceReference rr_root,
ResourceReference rr)
ServletContext implementation - Translate a piece of path. |
javax.servlet.RequestDispatcher |
getRequestDispatcher(java.lang.String urlpath)
Returns a RequestDispatcher object for the specified URL path if the context knows of an active source (such as a servlet, JSP page, CGI script, etc) of content for the particular path. |
java.net.URL |
getResource(java.lang.String path)
|
java.io.InputStream |
getResourceAsStream(java.lang.String path)
|
java.util.Set |
getResourcePaths(java.lang.String path)
from Servlet 2.3, very file-oriented FIXME always returning null as of now |
ServerInterface |
getServer()
|
java.lang.String |
getServerInfo()
ServletContext implementation - Get server informations. |
javax.servlet.Servlet |
getServlet(java.lang.String name)
Deprecated. since jsdk2.1 |
java.lang.String |
getServletContextName()
from Servlet 2.3, very file-oriented should return a web-app container name FIXME always returning null as of now |
java.io.File |
getServletDirectory()
|
protected int |
getServletInstanceMax()
|
java.io.File |
getServletLogFile()
|
java.util.Enumeration |
getServletNames()
Deprecated. since jsdk2.1 |
java.util.Enumeration |
getServlets()
Deprecated. since jsdk2.1 |
protected long |
getServletTimeout()
|
protected static java.lang.String |
guessContentTypeFromName(java.lang.String fname)
A useful utility routine that tries to guess the content-type of an object based upon its extension. |
void |
log(java.lang.Exception ex,
java.lang.String msg)
Deprecated. since jsdk2.1 |
void |
log(java.lang.String msg)
ServletContext implementation - Log a message. |
void |
log(java.lang.String message,
java.lang.Throwable throwable)
|
boolean |
propertyChanged(java.lang.String name)
The callback method, invoked when any property change occurs. |
void |
removeAttribute(java.lang.String name)
|
void |
resourceUnloaded(StructureChangedEvent evt)
A resource is about to be unloaded This handles the RESOURCE_UNLOADED kind of events. |
void |
setAttribute(java.lang.String name,
java.lang.Object object)
|
| Methods inherited from class org.w3c.tools.resources.event.StructureChangedAdapter |
resourceCreated, resourceModified, resourceRemoved |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String TEMPDIR_P
protected static java.lang.String logdir
protected static java.lang.String deflogfile
| Constructor Detail |
protected JigsawServletContext(ResourceReference ref,
ObservableProperties props)
ref - a ResourceReference pointing on a ServletDirectoryFrame.| Method Detail |
public boolean propertyChanged(java.lang.String name)
PropertyMonitoring
propertyChanged in interface PropertyMonitoringname - The name of the property that changed.
public void resourceUnloaded(StructureChangedEvent evt)
StructureChangedAdapterRESOURCE_UNLOADED kind of events.
resourceUnloaded in interface StructureChangedListenerresourceUnloaded in class StructureChangedAdapterevt - The event describing the change.protected long getServletTimeout()
protected int getServletInstanceMax()
protected static java.lang.String guessContentTypeFromName(java.lang.String fname)
public java.lang.String getMimeType(java.lang.String filename)
getMimeType in interface javax.servlet.ServletContextpublic ServerInterface getServer()
public java.io.File getServletLogFile()
public javax.servlet.Servlet getServlet(java.lang.String name)
getServlet in interface javax.servlet.ServletContextpublic java.util.Enumeration getServlets()
getServlets in interface javax.servlet.ServletContextpublic java.util.Enumeration getServletNames()
getServletNames in interface javax.servlet.ServletContextpublic void log(java.lang.String msg)
log in interface javax.servlet.ServletContext
public void log(java.lang.Exception ex,
java.lang.String msg)
log in interface javax.servlet.ServletContext
public void log(java.lang.String message,
java.lang.Throwable throwable)
log in interface javax.servlet.ServletContext
protected static java.lang.String getRealPath(java.lang.String path,
ResourceReference rr_root,
ResourceReference rr)
path - the virtual path to translaterr_root - the Root ResourceReferencerr - the target ResourceReference
public java.util.Set getResourcePaths(java.lang.String path)
public java.lang.String getServletContextName()
public java.lang.String getRealPath(java.lang.String path)
getRealPath in interface javax.servlet.ServletContextpath - the virtual path to translate
protected static java.lang.String getFilePath(DirectoryResource dir)
protected static ResourceReference getLocalRoot(ResourceReference rr_root,
ResourceReference ref)
public java.lang.String getServerInfo()
getServerInfo in interface javax.servlet.ServletContextpublic java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface javax.servlet.ServletContextname - The attribute name.
public void setAttribute(java.lang.String name,
java.lang.Object object)
setAttribute in interface javax.servlet.ServletContextpublic void removeAttribute(java.lang.String name)
removeAttribute in interface javax.servlet.ServletContextpublic java.util.Enumeration getAttributeNames()
getAttributeNames in interface javax.servlet.ServletContextpublic java.lang.String getInitParameter(java.lang.String name)
String containing the value of the named
context-wide initialization parameter, or null if the
parameter does not exist.
This method can make available configuration information useful to an entire "web application". For example, it can provide a webmaster's email address or the name of a system that holds critical data.
getInitParameter in interface javax.servlet.ServletContextname - a String containing the name of the
parameter whose value is requested
String containing at least the
servlet container name and version numberServletConfig#getInitParameterpublic java.util.Enumeration getInitParameterNames()
Enumeration of String objects, or an
empty Enumeration if the context has no initialization
parameters.
getInitParameterNames in interface javax.servlet.ServletContextEnumeration of String
objects containing the names of the context's initialization parametersServletConfig#getInitParameterprotected AutoReloadServletLoader getLocalServletLoader()
protected AutoReloadServletLoader createNewLocalServletLoader(boolean keepold)
public java.io.File getServletDirectory()
public javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String urlpath)
getRequestDispatcher in interface javax.servlet.ServletContexturlpath - Path to use to look up the target server resourcepublic javax.servlet.RequestDispatcher getNamedDispatcher(java.lang.String name)
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.
getNamedDispatcher in interface javax.servlet.ServletContextname - a String specifying the name
of a servlet to wrap
RequestDispatcher object
that acts as a wrapper for the named servletRequestDispatcher,
ServletContext.getContext(java.lang.String),
ServletConfig#getServletNamepublic int getMajorVersion()
getMajorVersion in interface javax.servlet.ServletContextpublic int getMinorVersion()
getMinorVersion in interface javax.servlet.ServletContextpublic javax.servlet.ServletContext getContext(java.lang.String uripath)
getContext in interface javax.servlet.ServletContext
public java.net.URL getResource(java.lang.String path)
throws java.net.MalformedURLException
getResource in interface javax.servlet.ServletContextjava.net.MalformedURLExceptionpublic java.io.InputStream getResourceAsStream(java.lang.String path)
getResourceAsStream in interface javax.servlet.ServletContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||