All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface Acme.Serve.servlet.ServletContext

public interface ServletContext

Method Index

 o getAttribute(String)
Returns the value of the named attribute of the network service, or null if the attribute does not exist.
 o getMimeType(String)
Returns the MIME type of the specified file.
 o getRealPath(String)
Applies alias rules to the specified virtual path and returns the corresponding real path.
 o getServerInfo()
Returns the name and version of the web server under which the servlet is running.
 o getServlet(String)
Gets a servlet by name.
 o getServletNames()
Enumerates the names of the servlets in this context (server).
 o getServlets()
Enumerates the servlets in this context (server).
 o log(Exception, String)
Write a stack trace to the servlet log.
 o log(String)
Write information to the servlet log.

Methods

 o 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
 o 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.

 o 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.

 o log
 public abstract void log(String message)
Write information to the servlet log.

Parameters:
message - the message to log
 o 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
 o 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
 o getMimeType
 public abstract String getMimeType(String file)
Returns the MIME type of the specified file.

Parameters:
file - file name whose MIME type is required
 o 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.

 o 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