org.apache.jasper.servlet
public class JspCServletContext extends Object implements ServletContext
ServletContext
implementation without
HTTP-specific methods.
Field Summary | |
---|---|
protected Hashtable | myAttributes
Servlet context attributes. |
protected PrintWriter | myLogWriter
The log writer we will write log messages to. |
protected URL | myResourceBaseURL
The base URL (document root) for this context. |
Constructor Summary | |
---|---|
JspCServletContext(PrintWriter aLogWriter, URL aResourceBaseURL)
Create a new instance of this ServletContext implementation.
|
Method Summary | |
---|---|
Object | getAttribute(String name)
Return the specified context attribute, if any.
|
Enumeration | getAttributeNames()
Return an enumeration of context attribute names. |
ServletContext | getContext(String uripath)
Return the servlet context for the specified path.
|
String | getContextPath()
Return the context path. |
String | getInitParameter(String name)
Return the specified context initialization parameter.
|
Enumeration | getInitParameterNames()
Return an enumeration of the names of context initialization
parameters. |
int | getMajorVersion()
Return the Servlet API major version number. |
String | getMimeType(String file)
Return the MIME type for the specified filename.
|
int | getMinorVersion()
Return the Servlet API minor version number. |
RequestDispatcher | getNamedDispatcher(String name)
Return a request dispatcher for the specified servlet name.
|
String | getRealPath(String path)
Return the real path for the specified context-relative
virtual path.
|
RequestDispatcher | getRequestDispatcher(String path)
Return a request dispatcher for the specified context-relative path.
|
URL | getResource(String path)
Return a URL object of a resource that is mapped to the
specified context-relative path.
|
InputStream | getResourceAsStream(String path)
Return an InputStream allowing access to the resource at the
specified context-relative path.
|
Set | getResourcePaths(String path)
Return the set of resource paths for the "directory" at the
specified context path.
|
String | getServerInfo()
Return descriptive information about this server. |
Servlet | getServlet(String name)
Return a null reference for the specified servlet name.
|
String | getServletContextName()
Return the name of this servlet context. |
Enumeration | getServletNames()
Return an empty enumeration of servlet names.
|
Enumeration | getServlets()
Return an empty enumeration of servlets.
|
void | log(String message)
Log the specified message.
|
void | log(Exception exception, String message)
Log the specified message and exception.
|
void | log(String message, Throwable exception)
Log the specified message and exception.
|
void | removeAttribute(String name)
Remove the specified context attribute.
|
void | setAttribute(String name, Object value)
Set or replace the specified context attribute.
|
Parameters: aLogWriter PrintWriter which is used for log()
calls aResourceBaseURL Resource base URL
Parameters: name Name of the requested attribute
Parameters: uripath Server-relative path starting with '/'
Parameters: name Name of the requested parameter
Parameters: file Filename whose MIME type is requested
Parameters: name Name of the requested servlet
Parameters: path The context-relative virtual path to resolve
Parameters: path Context-relative path for which to acquire a dispatcher
Parameters: path Context-relative path of the desired resource
Throws: MalformedURLException if the resource path is not properly formed
Parameters: path Context-relative path of the desired resource
Parameters: path Context-relative base path
Deprecated: This method has been deprecated with no replacement
Return a null reference for the specified servlet name.Parameters: name Name of the requested servlet
Deprecated: This method has been deprecated with no replacement
Return an empty enumeration of servlet names.Deprecated: This method has been deprecated with no replacement
Return an empty enumeration of servlets.Parameters: message The message to be logged
Deprecated: Use log(String,Throwable) instead
Log the specified message and exception.Parameters: exception The exception to be logged message The message to be logged
Parameters: message The message to be logged exception The exception to be logged
Parameters: name Name of the attribute to remove
Parameters: name Name of the context attribute to set value Corresponding attribute value