Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » jasper » servlet » [javadoc | source]
org.apache.jasper.servlet
public class: JspCServletContext [javadoc | source]
java.lang.Object
   org.apache.jasper.servlet.JspCServletContext

All Implemented Interfaces:
    ServletContext

Simple 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:
 public JspCServletContext(PrintWriter aLogWriter,
    URL aResourceBaseURL) 
    Create a new instance of this ServletContext implementation.
    Parameters:
    aLogWriter - PrintWriter which is used for log() calls
    aResourceBaseURL - Resource base URL
Method from org.apache.jasper.servlet.JspCServletContext Summary:
getAttribute,   getAttributeNames,   getContext,   getContextPath,   getInitParameter,   getInitParameterNames,   getMajorVersion,   getMimeType,   getMinorVersion,   getNamedDispatcher,   getRealPath,   getRequestDispatcher,   getResource,   getResourceAsStream,   getResourcePaths,   getServerInfo,   getServlet,   getServletContextName,   getServletNames,   getServlets,   log,   log,   log,   removeAttribute,   setAttribute
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jasper.servlet.JspCServletContext Detail:
 public Object getAttribute(String name) 
    Return the specified context attribute, if any.
 public Enumeration getAttributeNames() 
    Return an enumeration of context attribute names.
 public ServletContext getContext(String uripath) 
    Return the servlet context for the specified path.
 public String getContextPath() 
    Return the context path.
 public String getInitParameter(String name) 
    Return the specified context initialization parameter.
 public Enumeration getInitParameterNames() 
    Return an enumeration of the names of context initialization parameters.
 public int getMajorVersion() 
    Return the Servlet API major version number.
 public String getMimeType(String file) 
    Return the MIME type for the specified filename.
 public int getMinorVersion() 
    Return the Servlet API minor version number.
 public RequestDispatcher getNamedDispatcher(String name) 
    Return a request dispatcher for the specified servlet name.
 public String getRealPath(String path) 
    Return the real path for the specified context-relative virtual path.
 public RequestDispatcher getRequestDispatcher(String path) 
    Return a request dispatcher for the specified context-relative path.
 public URL getResource(String path) throws MalformedURLException 
    Return a URL object of a resource that is mapped to the specified context-relative path.
 public InputStream getResourceAsStream(String path) 
    Return an InputStream allowing access to the resource at the specified context-relative path.
 public Set getResourcePaths(String path) 
    Return the set of resource paths for the "directory" at the specified context path.
 public String getServerInfo() 
    Return descriptive information about this server.
 public Servlet getServlet(String name) throws ServletException 
Deprecated! This - method has been deprecated with no replacement

    Return a null reference for the specified servlet name.
 public String getServletContextName() 
    Return the name of this servlet context.
 public Enumeration getServletNames() 
Deprecated! This - method has been deprecated with no replacement

    Return an empty enumeration of servlet names.
 public Enumeration getServlets() 
Deprecated! This - method has been deprecated with no replacement

    Return an empty enumeration of servlets.
 public  void log(String message) 
    Log the specified message.
 public  void log(Exception exception,
    String message) 
Deprecated! Use - log(String,Throwable) instead

    Log the specified message and exception.
 public  void log(String message,
    Throwable exception) 
    Log the specified message and exception.
 public  void removeAttribute(String name) 
    Remove the specified context attribute.
 public  void setAttribute(String name,
    Object value) 
    Set or replace the specified context attribute.