|
Test webapp | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectHttpServlet
adriani.webapp.ServletOne
public class ServletOne
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 |
---|
public ServletOne()
Method Detail |
---|
public void init(ServletConfig config) throws ServletException
ServletException
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
request
object.
To send back data to the client browser use the response
object.
request
- the HTTP request (passed automatically by Tomcat).response
- the HTTP response (returned automatically by Tomcat).
ServletException
java.io.IOException
public java.lang.StringBuffer getDescription(boolean html)
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.
html
- if true
the text message is formatted for the HTML output.
|
Build 10/01/2013 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |