adapforms.web
Class AdapFormsServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by adapforms.web.AdapFormsServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class AdapFormsServlet
extends javax.servlet.http.HttpServlet

J2EE HTTP servlet for handling all interaction with the web client. The servlet should in most cases only be used indirectly.

Responsibilities:
- Rendering the actual form to the client.
- Receiving user events from the client, and responding with a list of adaptations.
- Serving static content to the client: images, scripts etc.

This is accomplished by parsing requests and delegating them to the relevant handler.

Author:
Henrik Gammelmark, geemark@cs.au.dk
See Also:
Serialized Form

Constructor Summary
AdapFormsServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
static java.lang.String getCompleteServletPath()
          Get the complete servlet path, including the context path within the webserver.
static Controller getController()
          Get the controller currently being used.
static Renderer getRenderer()
          Get the renderer currently being used.
 
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, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdapFormsServlet

public AdapFormsServlet()
Method Detail

doPost

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

doGet

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

getRenderer

public static Renderer getRenderer()
Get the renderer currently being used.


getController

public static Controller getController()
Get the controller currently being used.


getCompleteServletPath

public static java.lang.String getCompleteServletPath()
Get the complete servlet path, including the context path within the webserver.

Notice: This will return null until the servlet has received as least one HTTP request.