All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Acme.Serve.TestServlet

java.lang.Object
   |
   +----Acme.Serve.servlet.GenericServlet
           |
           +----Acme.Serve.servlet.http.HttpServlet
                   |
                   +----Acme.Serve.TestServlet

public class TestServlet
extends HttpServlet
Simple servlet that tests the Servlet API. Sample output:
 getContentLength(): -1
 getContentType(): null
 getProtocol(): HTTP/1.0
 getScheme(): http
 getServerName(): www.acme.com
 getServerPort(): 1234
 getRemoteAddr(): 192.100.66.1
 getRemoteHost(): acme.com
 getMethod(): GET
 getRequestURI(): http://www.acme.com:1234/TestServlet?foo=bar
 getServletPath(): /TestServlet
 getPathInfo(): null
 getPathTranslated(): null
 getQueryString(): foo=bar
 getRemoteUser(): null
 getAuthType(): null
 Parameters:
     foo = bar
 Header:
     accept: text/html, image/gif, image/jpeg, *; q=.2
     user-agent: Java1.0.2
 
Fetch the software.
Fetch the entire Acme package.


Constructor Index

 o TestServlet()

Method Index

 o getServletInfo()
Returns a string containing information about the author, version, and copyright of the servlet.
 o service(HttpServletRequest, HttpServletResponse)
Services a single request from the client.

Constructors

 o TestServlet
 public TestServlet()

Methods

 o getServletInfo
 public String getServletInfo()
Returns a string containing information about the author, version, and copyright of the servlet.

Overrides:
getServletInfo in class GenericServlet
 o service
 public void service(HttpServletRequest req,
                     HttpServletResponse res) throws ServletException, IOException
Services a single request from the client.

Parameters:
req - the servlet request
req - the servlet response
Throws: ServletException
when an exception has occurred
Overrides:
service in class HttpServlet

All Packages  Class Hierarchy  This Package  Previous  Next  Index

ACME Java  ACME Labs