| Method from org.apache.jasper.servlet.JspCServletContext Detail: |
public Object getAttribute(String name) {
return (myAttributes.get(name));
}
Return the specified context attribute, if any. |
public Enumeration getAttributeNames() {
return (myAttributes.keys());
}
Return an enumeration of context attribute names. |
public ServletContext getContext(String uripath) {
return (null);
}
Return the servlet context for the specified path. |
public String getContextPath() {
return (null);
}
|
public String getInitParameter(String name) {
return (null);
}
Return the specified context initialization parameter. |
public Enumeration getInitParameterNames() {
return (new Vector().elements());
}
Return an enumeration of the names of context initialization
parameters. |
public int getMajorVersion() {
return (2);
}
Return the Servlet API major version number. |
public String getMimeType(String file) {
return (null);
}
Return the MIME type for the specified filename. |
public int getMinorVersion() {
return (3);
}
Return the Servlet API minor version number. |
public RequestDispatcher getNamedDispatcher(String name) {
return (null);
}
Return a request dispatcher for the specified servlet name. |
public String getRealPath(String path) {
if (!myResourceBaseURL.getProtocol().equals("file"))
return (null);
if (!path.startsWith("/"))
return (null);
try {
return
(getResource(path).getFile().replace('/", File.separatorChar));
} catch (Throwable t) {
return (null);
}
}
Return the real path for the specified context-relative
virtual path. |
public RequestDispatcher getRequestDispatcher(String path) {
return (null);
}
Return a request dispatcher for the specified context-relative path. |
public URL getResource(String path) throws MalformedURLException {
if (!path.startsWith("/"))
throw new MalformedURLException("Path '" + path +
"' does not start with '/'");
URL url = new URL(myResourceBaseURL, path.substring(1));
InputStream is = null;
try {
is = url.openStream();
} catch (Throwable t) {
url = null;
} finally {
if (is != null) {
try {
is.close();
} catch (Throwable t2) {
// Ignore
}
}
}
return url;
}
Return a URL object of a resource that is mapped to the
specified context-relative path. |
public InputStream getResourceAsStream(String path) {
try {
return (getResource(path).openStream());
} catch (Throwable t) {
return (null);
}
}
Return an InputStream allowing access to the resource at the
specified context-relative path. |
public Set getResourcePaths(String path) {
Set thePaths = new HashSet();
if (!path.endsWith("/"))
path += "/";
String basePath = getRealPath(path);
if (basePath == null)
return (thePaths);
File theBaseDir = new File(basePath);
if (!theBaseDir.exists() || !theBaseDir.isDirectory())
return (thePaths);
String theFiles[] = theBaseDir.list();
for (int i = 0; i < theFiles.length; i++) {
File testFile = new File(basePath + File.separator + theFiles[i]);
if (testFile.isFile())
thePaths.add(path + theFiles[i]);
else if (testFile.isDirectory())
thePaths.add(path + theFiles[i] + "/");
}
return (thePaths);
}
Return the set of resource paths for the "directory" at the
specified context path. |
public String getServerInfo() {
return ("JspCServletContext/1.0");
}
Return descriptive information about this server. |
public Servlet getServlet(String name) throws ServletException {
return (null);
} Deprecated! This - method has been deprecated with no replacement
Return a null reference for the specified servlet name. |
public String getServletContextName() {
return (getServerInfo());
}
Return the name of this servlet context. |
public Enumeration getServletNames() {
return (new Vector().elements());
} Deprecated! This - method has been deprecated with no replacement
Return an empty enumeration of servlet names. |
public Enumeration getServlets() {
return (new Vector().elements());
} Deprecated! This - method has been deprecated with no replacement
Return an empty enumeration of servlets. |
public void log(String message) {
myLogWriter.println(message);
}
Log the specified message. |
public void log(Exception exception,
String message) {
log(message, exception);
} Deprecated! Use - log(String,Throwable) instead
Log the specified message and exception. |
public void log(String message,
Throwable exception) {
myLogWriter.println(message);
exception.printStackTrace(myLogWriter);
}
Log the specified message and exception. |
public void removeAttribute(String name) {
myAttributes.remove(name);
}
Remove the specified context attribute. |
public void setAttribute(String name,
Object value) {
myAttributes.put(name, value);
}
Set or replace the specified context attribute. |