com.acme
Class AnnotationTest

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.acme.AnnotationTest
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class AnnotationTest
extends HttpServlet

AnnotationTest Use Annotations from within Jetty. Also, use servlet spec 2.5 resource injection and lifecycle callbacks from within the web.xml to set up some of the JNDI resources.

See Also:
Serialized Form

Constructor Summary
AnnotationTest()
           
 
Method Summary
 void doGet(HttpServletRequest request, HttpServletResponse response)
           
 void doPost(HttpServletRequest request, HttpServletResponse response)
           
 void init(ServletConfig config)
           
 void setMyDatasource(DataSource ds)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationTest

public AnnotationTest()
Method Detail

setMyDatasource

public void setMyDatasource(DataSource ds)

init

public void init(ServletConfig config)
          throws ServletException
Specified by:
init in interface Servlet
Overrides:
init in class GenericServlet
Throws:
ServletException

doPost

public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
            throws ServletException,
                   IOException
Overrides:
doPost in class HttpServlet
Throws:
ServletException
IOException

doGet

public void doGet(HttpServletRequest request,
                  HttpServletResponse response)
           throws ServletException,
                  IOException
Overrides:
doGet in class HttpServlet
Throws:
ServletException
IOException


Copyright © 1995-2008 Mort Bay Consulting. All Rights Reserved.