|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | 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)
|
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 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. |
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)
|
protected static java.io.File |
getRootDirectory(ResourceReference rr_root,
ResourceReference ref)
|
ServerInterface |
getServer()
|
java.lang.String |
getServerInfo()
ServletContext implementation - Get server informations. |
javax.servlet.Servlet |
getServlet(java.lang.String name)
Deprecated. since jsdk2.1 |
java.io.File |
getServletDirectory()
|
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)
|
protected static java.io.File |
lookupLocalRoot(FramedResource res,
ResourceReference ref)
|
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)
name
- The name of the property that changed.public void resourceUnloaded(StructureChangedEvent evt)
RESOURCE_UNLOADED
kind of events.evt
- The event describing the change.protected long getServletTimeout()
protected static java.lang.String guessContentTypeFromName(java.lang.String fname)
public java.lang.String getMimeType(java.lang.String filename)
public ServerInterface getServer()
public java.io.File getServletLogFile()
public javax.servlet.Servlet getServlet(java.lang.String name)
public java.util.Enumeration getServlets()
public java.util.Enumeration getServletNames()
public void log(java.lang.String msg)
public void log(java.lang.Exception ex, java.lang.String msg)
public void log(java.lang.String message, java.lang.Throwable throwable)
public java.lang.String getRealPath(java.lang.String path)
protected static java.io.File getRootDirectory(ResourceReference rr_root, ResourceReference ref)
protected static java.io.File lookupLocalRoot(FramedResource res, ResourceReference ref)
public java.lang.String getServerInfo()
public java.lang.Object getAttribute(java.lang.String name)
name
- The attribute name.public void setAttribute(java.lang.String name, java.lang.Object object)
public void removeAttribute(java.lang.String name)
public java.util.Enumeration getAttributeNames()
public 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.
name
- a String
containing the name of the
parameter whose value is requestedString
containing at least the
servlet container name and version numberServletConfig.getInitParameter(java.lang.String)
public java.util.Enumeration getInitParameterNames()
Enumeration
of String
objects, or an
empty Enumeration
if the context has no initialization
parameters.Enumeration
of String
objects containing the names of the context's initialization parametersServletConfig.getInitParameter(java.lang.String)
protected AutoReloadServletLoader getLocalServletLoader()
protected AutoReloadServletLoader createNewLocalServletLoader(boolean keepold)
public java.io.File getServletDirectory()
public javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String urlpath)
urlpath
- 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.
name
- a String
specifying the name
of a servlet to wrapRequestDispatcher
object
that acts as a wrapper for the named servletRequestDispatcher
,
ServletContext.getContext(java.lang.String)
,
ServletConfig.getServletName()
public int getMajorVersion()
public int getMinorVersion()
public javax.servlet.ServletContext getContext(java.lang.String uripath)
public java.net.URL getResource(java.lang.String path) throws java.net.MalformedURLException
public java.io.InputStream getResourceAsStream(java.lang.String path)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |