org.apache.jasper.servlet
クラス JspCServletContext

java.lang.Object
  |
  +--org.apache.jasper.servlet.JspCServletContext
すべての実装インタフェース:
javax.servlet.ServletContext

public class JspCServletContext
extends java.lang.Object
implements javax.servlet.ServletContext

Simple ServletContext implementation without HTTP-specific methods.

作成者:
Peter Rossbach (pr@webapp.de)

フィールドの概要
protected  java.util.Hashtable myAttributes
          Servlet context attributes.
protected  java.io.PrintWriter myLogWriter
          The log writer we will write log messages to.
protected  java.net.URL myResourceBaseURL
          The base URL (document root) for this context.
 
コンストラクタの概要
JspCServletContext(java.io.PrintWriter aLogWriter, java.net.URL aResourceBaseURL)
          Create a new instance of this ServletContext implementation.
 
メソッドの概要
 java.lang.Object getAttribute(java.lang.String name)
          Return the specified context attribute, if any.
 java.util.Enumeration getAttributeNames()
          Return an enumeration of context attribute names.
 javax.servlet.ServletContext getContext(java.lang.String uripath)
          Return the servlet context for the specified path.
 java.lang.String getInitParameter(java.lang.String name)
          Return the specified context initialization parameter.
 java.util.Enumeration getInitParameterNames()
          Return an enumeration of the names of context initialization parameters.
 int getMajorVersion()
          Return the Servlet API major version number.
 java.lang.String getMimeType(java.lang.String file)
          Return the MIME type for the specified filename.
 int getMinorVersion()
          Return the Servlet API minor version number.
 javax.servlet.RequestDispatcher getNamedDispatcher(java.lang.String name)
          Return a request dispatcher for the specified servlet name.
 java.lang.String getRealPath(java.lang.String path)
          Return the real path for the specified context-relative virtual path.
 javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
          Return a request dispatcher for the specified context-relative path.
 java.net.URL getResource(java.lang.String path)
          Return a URL object of a resource that is mapped to the specified context-relative path.
 java.io.InputStream getResourceAsStream(java.lang.String path)
          Return an InputStream allowing access to the resource at the specified context-relative path.
 java.util.Set getResourcePaths(java.lang.String path)
          Return the set of resource paths for the "directory" at the specified context path.
 java.lang.String getServerInfo()
          Return descriptive information about this server.
 javax.servlet.Servlet getServlet(java.lang.String name)
          推奨されていません。 This method has been deprecated with no replacement
 java.lang.String getServletContextName()
          Return the name of this servlet context.
 java.util.Enumeration getServletNames()
          推奨されていません。 This method has been deprecated with no replacement
 java.util.Enumeration getServlets()
          推奨されていません。 This method has been deprecated with no replacement
 void log(java.lang.Exception exception, java.lang.String message)
          推奨されていません。 Use log(String,Throwable) instead
 void log(java.lang.String message)
          Log the specified message.
 void log(java.lang.String message, java.lang.Throwable exception)
          Log the specified message and exception.
 void removeAttribute(java.lang.String name)
          Remove the specified context attribute.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Set or replace the specified context attribute.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

myAttributes

protected java.util.Hashtable myAttributes
Servlet context attributes.

myLogWriter

protected java.io.PrintWriter myLogWriter
The log writer we will write log messages to.

myResourceBaseURL

protected java.net.URL myResourceBaseURL
The base URL (document root) for this context.
コンストラクタの詳細

JspCServletContext

public JspCServletContext(java.io.PrintWriter aLogWriter,
                          java.net.URL aResourceBaseURL)
Create a new instance of this ServletContext implementation.
パラメータ:
aLogWriter - PrintWriter which is used for log() calls
aResourceBaseURL - Resource base URL
メソッドの詳細

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Return the specified context attribute, if any.
定義:
インタフェース javax.servlet.ServletContext 内の getAttribute
パラメータ:
name - Name of the requested attribute

getAttributeNames

public java.util.Enumeration getAttributeNames()
Return an enumeration of context attribute names.
定義:
インタフェース javax.servlet.ServletContext 内の getAttributeNames

getContext

public javax.servlet.ServletContext getContext(java.lang.String uripath)
Return the servlet context for the specified path.
定義:
インタフェース javax.servlet.ServletContext 内の getContext
パラメータ:
uripath - Server-relative path starting with '/'

getInitParameter

public java.lang.String getInitParameter(java.lang.String name)
Return the specified context initialization parameter.
定義:
インタフェース javax.servlet.ServletContext 内の getInitParameter
パラメータ:
name - Name of the requested parameter

getInitParameterNames

public java.util.Enumeration getInitParameterNames()
Return an enumeration of the names of context initialization parameters.
定義:
インタフェース javax.servlet.ServletContext 内の getInitParameterNames

getMajorVersion

public int getMajorVersion()
Return the Servlet API major version number.
定義:
インタフェース javax.servlet.ServletContext 内の getMajorVersion

getMimeType

public java.lang.String getMimeType(java.lang.String file)
Return the MIME type for the specified filename.
定義:
インタフェース javax.servlet.ServletContext 内の getMimeType
パラメータ:
file - Filename whose MIME type is requested

getMinorVersion

public int getMinorVersion()
Return the Servlet API minor version number.
定義:
インタフェース javax.servlet.ServletContext 内の getMinorVersion

getNamedDispatcher

public javax.servlet.RequestDispatcher getNamedDispatcher(java.lang.String name)
Return a request dispatcher for the specified servlet name.
定義:
インタフェース javax.servlet.ServletContext 内の getNamedDispatcher
パラメータ:
name - Name of the requested servlet

getRealPath

public java.lang.String getRealPath(java.lang.String path)
Return the real path for the specified context-relative virtual path.
定義:
インタフェース javax.servlet.ServletContext 内の getRealPath
パラメータ:
path - The context-relative virtual path to resolve

getRequestDispatcher

public javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
Return a request dispatcher for the specified context-relative path.
定義:
インタフェース javax.servlet.ServletContext 内の getRequestDispatcher
パラメータ:
path - Context-relative path for which to acquire a dispatcher

getResource

public java.net.URL getResource(java.lang.String path)
                         throws java.net.MalformedURLException
Return a URL object of a resource that is mapped to the specified context-relative path.
定義:
インタフェース javax.servlet.ServletContext 内の getResource
パラメータ:
path - Context-relative path of the desired resource
例外:
java.net.MalformedURLException - if the resource path is not properly formed

getResourceAsStream

public java.io.InputStream getResourceAsStream(java.lang.String path)
Return an InputStream allowing access to the resource at the specified context-relative path.
定義:
インタフェース javax.servlet.ServletContext 内の getResourceAsStream
パラメータ:
path - Context-relative path of the desired resource

getResourcePaths

public java.util.Set getResourcePaths(java.lang.String path)
Return the set of resource paths for the "directory" at the specified context path.
定義:
インタフェース javax.servlet.ServletContext 内の getResourcePaths
パラメータ:
path - Context-relative base path

getServerInfo

public java.lang.String getServerInfo()
Return descriptive information about this server.
定義:
インタフェース javax.servlet.ServletContext 内の getServerInfo

getServlet

public javax.servlet.Servlet getServlet(java.lang.String name)
                                 throws javax.servlet.ServletException
推奨されていません。 This method has been deprecated with no replacement

Return a null reference for the specified servlet name.
定義:
インタフェース javax.servlet.ServletContext 内の getServlet
パラメータ:
name - Name of the requested servlet

getServletContextName

public java.lang.String getServletContextName()
Return the name of this servlet context.
定義:
インタフェース javax.servlet.ServletContext 内の getServletContextName

getServletNames

public java.util.Enumeration getServletNames()
推奨されていません。 This method has been deprecated with no replacement

Return an empty enumeration of servlet names.
定義:
インタフェース javax.servlet.ServletContext 内の getServletNames

getServlets

public java.util.Enumeration getServlets()
推奨されていません。 This method has been deprecated with no replacement

Return an empty enumeration of servlets.
定義:
インタフェース javax.servlet.ServletContext 内の getServlets

log

public void log(java.lang.String message)
Log the specified message.
定義:
インタフェース javax.servlet.ServletContext 内の log
パラメータ:
message - The message to be logged

log

public void log(java.lang.Exception exception,
                java.lang.String message)
推奨されていません。 Use log(String,Throwable) instead

Log the specified message and exception.
定義:
インタフェース javax.servlet.ServletContext 内の log
パラメータ:
exception - The exception to be logged
message - The message to be logged

log

public void log(java.lang.String message,
                java.lang.Throwable exception)
Log the specified message and exception.
定義:
インタフェース javax.servlet.ServletContext 内の log
パラメータ:
message - The message to be logged
exception - The exception to be logged

removeAttribute

public void removeAttribute(java.lang.String name)
Remove the specified context attribute.
定義:
インタフェース javax.servlet.ServletContext 内の removeAttribute
パラメータ:
name - Name of the attribute to remove

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Set or replace the specified context attribute.
定義:
インタフェース javax.servlet.ServletContext 内の setAttribute
パラメータ:
name - Name of the context attribute to set
value - Corresponding attribute value


Copyright ? 2000 Apache Software Foundation. All Rights Reserved.