All Packages Class Hierarchy This Package Previous Next Index
Interface Acme.Serve.servlet.ServletContext
- public interface ServletContext
-
getAttribute(String)
- Returns the value of the named attribute of the network service, or
null if the attribute does not exist.
-
getMimeType(String)
- Returns the MIME type of the specified file.
-
getRealPath(String)
- Applies alias rules to the specified virtual path and returns the
corresponding real path.
-
getServerInfo()
- Returns the name and version of the web server under which the servlet
is running.
-
getServlet(String)
- Gets a servlet by name.
-
getServletNames()
- Enumerates the names of the servlets in this context (server).
-
getServlets()
- Enumerates the servlets in this context (server).
-
log(Exception, String)
- Write a stack trace to the servlet log.
-
log(String)
- Write information to the servlet log.
getServlet
public abstract Servlet getServlet(String name) throws ServletException
- Gets a servlet by name.
- Parameters:
- name - the servlet name
- Returns:
- null if the servlet does not exist
- Throws: ServletException
- if the servlet could not be initialized
getServlets
public abstract Enumeration getServlets()
- Enumerates the servlets in this context (server). Only servlets that
are accesible will be returned. This enumeration always includes the
servlet itself.
getServletNames
public abstract Enumeration getServletNames()
- Enumerates the names of the servlets in this context (server).
Only servlets that are accesible will be returned. This enumeration
always includes the servlet itself.
log
public abstract void log(String message)
- Write information to the servlet log.
- Parameters:
- message - the message to log
log
public abstract void log(Exception exception,
String message)
- Write a stack trace to the servlet log.
- Parameters:
- exception - the exception to get the stack trace from
- message - the message to log
getRealPath
public abstract String getRealPath(String path)
- Applies alias rules to the specified virtual path and returns the
corresponding real path. It returns null if the translation
cannot be performed.
- Parameters:
- path - the path to be translated
getMimeType
public abstract String getMimeType(String file)
- Returns the MIME type of the specified file.
- Parameters:
- file - file name whose MIME type is required
getServerInfo
public abstract String getServerInfo()
- Returns the name and version of the web server under which the servlet
is running.
Same as the CGI variable SERVER_SOFTWARE.
getAttribute
public abstract Object getAttribute(String name)
- Returns the value of the named attribute of the network service, or
null if the attribute does not exist. This method allows access to
additional information about the service, not already provided by
the other methods in this interface.
All Packages Class Hierarchy This Package Previous Next Index
ACME Java ACME Labs