org.directwebremoting.servlet
Class DwrServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.directwebremoting.servlet.DwrServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
DwrCometProcessor, DwrGuiceServlet, DwrJaxerServlet, DwrSpringServlet

public class DwrServlet
extends javax.servlet.http.HttpServlet

This is the main servlet that handles all the requests to DWR.

It is on the large side because it can't use technologies like JSPs etc since it all needs to be deployed in a single jar file, and while it might be possible to integrate Velocity or similar I think simplicity is more important, and there are only 2 real pages both script heavy in this servlet anyway.

There are 5 things to do, in the order that you come across them:

Author:
Joe Walker [joe at getahead dot ltd dot uk]
See Also:
Serialized Form

Constructor Summary
DwrServlet()
           
 
Method Summary
 void destroy()
           
 void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 Container getContainer()
          Accessor for the IoC container.
 void init(javax.servlet.ServletConfig servletConfig)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DwrServlet

public DwrServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig servletConfig)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

doGet

public void doGet(javax.servlet.http.HttpServletRequest req,
                  javax.servlet.http.HttpServletResponse resp)
           throws java.io.IOException,
                  javax.servlet.ServletException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
java.io.IOException
javax.servlet.ServletException

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws java.io.IOException,
                   javax.servlet.ServletException
Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
java.io.IOException
javax.servlet.ServletException

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet

getContainer

public Container getContainer()
Accessor for the IoC container.


Copyright 2008