net.sourceforge.pebble.web.controller
Class HttpController

java.lang.Object
  extended by HttpServlet
      extended by net.sourceforge.pebble.web.controller.HttpController

public class HttpController
extends HttpServlet

An implementation of the front controller pattern, using the command and controller strategy.

Author:
Simon Brown

Constructor Summary
HttpController()
           
 
Method Summary
protected  void doGet(HttpServletRequest req, HttpServletResponse res)
          A default implementation of doGet that delegates to the processRequest method.
protected  void doPost(HttpServletRequest req, HttpServletResponse res)
          A default implementation of doPost that delegates to the processRequest method.
 void init()
          Initialises this instance.
protected  void processRequest(HttpServletRequest request, HttpServletResponse response)
          Processes the request - this is delegated to from doGet and doPost.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpController

public HttpController()
Method Detail

init

public void init()
Initialises this instance.


processRequest

protected void processRequest(HttpServletRequest request,
                              HttpServletResponse response)
                       throws ServletException,
                              java.io.IOException
Processes the request - this is delegated to from doGet and doPost.

Parameters:
request - the HttpServletRequest instance
response - the HttpServletResponse instance
Throws:
ServletException
java.io.IOException

doGet

protected void doGet(HttpServletRequest req,
                     HttpServletResponse res)
              throws ServletException,
                     java.io.IOException
A default implementation of doGet that delegates to the processRequest method.

Parameters:
req - the HttpServletRequest instance
res - the HttpServletResponse instance
Throws:
ServletException
java.io.IOException

doPost

protected void doPost(HttpServletRequest req,
                      HttpServletResponse res)
               throws ServletException,
                      java.io.IOException
A default implementation of doPost that delegates to the processRequest method.

Parameters:
req - the HttpServletRequest instance
res - the HttpServletResponse instance
Throws:
ServletException
java.io.IOException


Copyright © 2003-2006, Simon Brown. All Rights Reserved.