Test webapp

adriani.webapp
Class ServletOne

java.lang.Object
  extended by HttpServlet
      extended by adriani.webapp.ServletOne

public class ServletOne
extends HttpServlet

A simple servlet mapped to the logic name "servletOne" in the web.xml configuration file. This class is instanciated by Tomcat only the first time the servlet is requested. The scope of this class, as the usage condition, are defined in the web.xml configuration file. For example:


     <servlet-name>servletOne</servlet-name>
      <url-pattern>*.foo</url-pattern>
 
Specify that this servlet will be invoked when calling an URL ending with "foo". In the Test web app enviroment this should happen when calling the URL:

http://localhost:8080/test/home/test.foo


Constructor Summary
ServletOne()
           
 
Method Summary
 void doGet(HttpServletRequest request, HttpServletResponse response)
          Method invoked when the servlet is activated by a normal URL request (e.g. an HTTP GET request).
 java.lang.StringBuffer getDescription(boolean html)
          This method just return a StringBuffer object describing the purposes of this class.
 void init(ServletConfig config)
          Method automatically invoked by the Servlet Container the first time the servlet is called.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletOne

public ServletOne()
Method Detail

init

public void init(ServletConfig config)
          throws ServletException
Method automatically invoked by the Servlet Container the first time the servlet is called.

Throws:
ServletException

doGet

public void doGet(HttpServletRequest request,
                  HttpServletResponse response)
           throws ServletException,
                  java.io.IOException
Method invoked when the servlet is activated by a normal URL request (e.g. an HTTP GET request). If it's necessary to read incoming HTTP parameters or cookies use the request object. To send back data to the client browser use the response object.

Parameters:
request - the HTTP request (passed automatically by Tomcat).
response - the HTTP response (returned automatically by Tomcat).
Throws:
ServletException
java.io.IOException

getDescription

public java.lang.StringBuffer getDescription(boolean html)
This method just return a StringBuffer object describing the purposes of this class. The text message can be used for introspection or to print some documentation in the produced HTML page.

Parameters:
html - if true the text message is formatted for the HTML output.
Returns:
a text message describing the purpose of this class.

Build 10/01/2013

Morpheus Quality Technologies - making the Zion software
Copyright © 2009-2013 Stefano Adriani. All Rights Reserved