|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectHttpServlet
org.directwebremoting.servlet.DwrServlet
public class DwrServlet
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:
Field Summary | |
---|---|
static Logger |
log
The log stream |
Constructor Summary | |
---|---|
DwrServlet()
|
Method Summary | |
---|---|
void |
destroy()
|
protected void |
doGet(HttpServletRequest req,
HttpServletResponse resp)
|
protected void |
doPost(HttpServletRequest request,
HttpServletResponse response)
|
Container |
getContainer()
Accessor for the DWR IoC container. |
void |
init(ServletConfig servletConfig)
|
void |
shutdown()
Kill all comet polls. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Logger log
Constructor Detail |
---|
public DwrServlet()
Method Detail |
---|
public void init(ServletConfig servletConfig) throws ServletException
ServletException
public void destroy()
public void shutdown()
Technically a servlet engine ought to call this only when all the threads are already removed, however at least Tomcat doesn't do this properly (it waits for a while and then calls destroy anyway).
It would be good if we could get destroy()
to call this
method however destroy() is only called once all threads are done so it's
too late.
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws java.io.IOException, ServletException
java.io.IOException
ServletException
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException
java.io.IOException
ServletException
public Container getContainer()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |