| java.lang.Object org.netbeans.modules.visualweb.jsfsupport.container.RaveServletContext
RaveServletContext | public class RaveServletContext implements ServletContext(Code) | | Provides a ServletContext (v 2.3) object for design-time use
author: Robert Brewin version: 1.0 |
Method Summary | |
public void | addInitParameter(String name, String value) | public Object | getAttribute(String name) Returns the servlet container attribute with the given name, or null if
there is no attribute by that name. | public Enumeration | getAttributeNames() Returns an Enumeration containing the attribute names available within
this servlet context. | public ServletContext | getContext(String uripath) Returns a ServletContext object that corresponds to a
specified URL on the server. | public String | getContextPath() | public String | getInitParameter(String name) Returns a String containing the value of the named context-wide
initialization parameter, or null if the parameter does not exist. | public 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. | public int | getMajorVersion() | public String | getMimeType(String path) Returns the MIME type of the specified file, or null if the MIME type is not known.
TODO: Return a valid MIME type... | public int | getMinorVersion() | public RequestDispatcher | getNamedDispatcher(String name) Returns a RequestDispatcher object that acts as a wrapper for the
named servlet. | public String | getRealPath(String path) Returns a String containing the real path for a given virtual path.
This method will attempt to find the resource using the current thread's
context class loader. | public RequestDispatcher | getRequestDispatcher(String path) Returns a RequestDispatcher object that acts as a wrapper for the
named servlet. | public URL | getResource(String resource) Returns a URL to the resource that is mapped to a specified path. | public InputStream | getResourceAsStream(String path) Returns a resource as an InputStream that is mapped to a specified path. | public Set | getResourcePaths(String path) Returns a directory-like listing of all the paths to resources. | public String | getServerInfo() Returns the name and version of the servlet container on which the servlet is
running. | public Servlet | getServlet(String name) Deprecated in Servlet APIs, included for compliation purposes only. | public String | getServletContextName() | public Enumeration | getServletNames() Deprecated in Servlet APIs, included for compliation purposes only. | public Enumeration | getServlets() Deprecated in Servlet APIs, included for compliation purposes only. | public void | log(String message) Writes the specified message to a servlet log file. | public void | log(Exception exception, String message) Deprecated in Servlet APIs, included for compliation purposes only. | public void | log(String message, Throwable exception) Writes the specified message and stack trace to a servlet log file. | public void | removeAttribute(String name) | public void | setAttribute(String name, Object value) Binds an object to a given attribute name in this servlet context. |
RaveServletContext | public RaveServletContext()(Code) | | Default constructor for a RaveServletContext object
|
addInitParameter | public void addInitParameter(String name, String value)(Code) | | Add an initialization parameter
Parameters: name - - a String specifying the name of the parameter Parameters: value - - a String representing the value for this parameter |
getAttribute | public Object getAttribute(String name)(Code) | | Returns the servlet container attribute with the given name, or null if
there is no attribute by that name. An attribute allows a servlet container
to give the servlet additional information not already provided by this
interface. See your server documentation for information about its attributes.
A list of supported attributes can be retrieved using
getAttributeNames .
The attribute is returned as a
java.lang.Object or some subclass.
Attribute names should follow the same convention as package names. The
Java Servlet API specification reserves names matching java.*, javax.*, and sun.*.
Parameters: name - - a String specifying the name of the attribute an Object containing the value of the attribute, or nullif no attribute exists matching the given name |
getAttributeNames | public Enumeration getAttributeNames()(Code) | | Returns an Enumeration containing the attribute names available within
this servlet context. Use the
getAttribute(java.lang.String) method
with an attribute name to get the value of an attribute.
an Enumeration of attribute names |
getContext | public ServletContext getContext(String uripath)(Code) | | Returns a ServletContext object that corresponds to a
specified URL on the server. In the Mock environment, this
method throws an UnsupportedOperationException as there
is only one context available
Parameters: uripath - - a String specifying the context path ofanother web application in the container. |
getInitParameter | public String getInitParameter(String name)(Code) | | Returns a String containing the value of the named context-wide
initialization parameter, or null if the parameter does not exist.
Parameters: name - - a String containing the name of the parameter whose value isrequested a String containing at least the servlet container nameand version number |
getInitParameterNames | public Enumeration getInitParameterNames()(Code) | | 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.
Enumeration of String objects containingthe names of the context's initialization parameters |
getMajorVersion | public int getMajorVersion()(Code) | | Returns the major version of the Java Servlet API that this servlet container
supports
2 |
getMimeType | public String getMimeType(String path)(Code) | | Returns the MIME type of the specified file, or null if the MIME type is not known.
TODO: Return a valid MIME type... at present, this method throws an UnsupportedOperationException
Parameters: path - - a String specifying the name of a file a String specifying the file's MIME type |
getMinorVersion | public int getMinorVersion()(Code) | | Returns the minor version of the Java Servlet API that this servlet container
supports
3 |
getNamedDispatcher | public RequestDispatcher getNamedDispatcher(String name)(Code) | | Returns a RequestDispatcher object that acts as a wrapper for the
named servlet. This method is unsupported in the Mock environment and
returns an UnsupportedOperationException
|
getRealPath | public String getRealPath(String path)(Code) | | Returns a String containing the real path for a given virtual path.
This method will attempt to find the resource using the current thread's
context class loader. This method will work only when the path specified
is a file path.
|
getRequestDispatcher | public RequestDispatcher getRequestDispatcher(String path)(Code) | | Returns a RequestDispatcher object that acts as a wrapper for the
named servlet. This method is unsupported in the Mock environment and
returns an UnsupportedOperationException
|
getResource | public URL getResource(String resource) throws MalformedURLException(Code) | | Returns a URL to the resource that is mapped to a specified path.
This method returns urls for specific resources available in the Mock jar
|
getResourceAsStream | public InputStream getResourceAsStream(String path)(Code) | | Returns a resource as an InputStream that is mapped to a specified path.
This method returns streams for specific resources available in the Mock jar
|
getResourcePaths | public Set getResourcePaths(String path)(Code) | | Returns a directory-like listing of all the paths to resources.
This method is unsupported in the Mock environment and returns null
|
getServerInfo | public String getServerInfo()(Code) | | Returns the name and version of the servlet container on which the servlet is
running.
|
getServlet | public Servlet getServlet(String name) throws ServletException(Code) | | Deprecated in Servlet APIs, included for compliation purposes only.
This method is unsupported in the Mock environment and returns an
UnsupportedOperationException
|
getServletContextName | public String getServletContextName()(Code) | | Returns the name of this web application associated with this context
|
getServletNames | public Enumeration getServletNames()(Code) | | Deprecated in Servlet APIs, included for compliation purposes only.
This method is unsupported in the Mock environment and returns an
UnsupportedOperationException
|
getServlets | public Enumeration getServlets()(Code) | | Deprecated in Servlet APIs, included for compliation purposes only.
This method is unsupported in the Mock environment and returns an
UnsupportedOperationException
|
log | public void log(String message)(Code) | | Writes the specified message to a servlet log file. Currently,
his method is unsupported in the Mock environment and returns an
UnsupportedOperationException
|
log | public void log(Exception exception, String message)(Code) | | Deprecated in Servlet APIs, included for compliation purposes only.
This method is unsupported in the Mock environment and returns an
UnsupportedOperationException
|
log | public void log(String message, Throwable exception)(Code) | | Writes the specified message and stack trace to a servlet log file. Currently,
his method is unsupported in the Mock environment and returns an
UnsupportedOperationException
|
removeAttribute | public void removeAttribute(String name)(Code) | | Removes the attribute with the given name from the servlet context
Parameters: name - - a String which contains the name of the attribute to remove |
setAttribute | public void setAttribute(String name, Object value)(Code) | | Binds an object to a given attribute name in this servlet context. If the name specified
is already used for an attribute, this method will replace the attribute with the new to
the new attribute.
Parameters: name - - a String specifying the name of the attribute Parameters: object - - an Object representing the attribute to be bound |
|
|