org.jboss.portal.server.servlet
Class CommandServlet

java.lang.Object
  extended by HttpServlet
      extended by org.jboss.portal.server.servlet.CommandServlet

public class CommandServlet
extends HttpServlet

This servlet is used to execute command coming from another context through a dispatching request.

The command invocation is detyped to allow it working on redeploy and avoid class cast exception.

Version:
$Revision: 6720 $
Author:
Julien Viet

Nested Class Summary
static interface CommandServlet.Dispatcher
          Provide an spi for dispatching to a request dispatcher.
 
Constructor Summary
CommandServlet()
           
 
Method Summary
protected  void doGet(HttpServletRequest req, HttpServletResponse resp)
           
protected  void doPost(HttpServletRequest req, HttpServletResponse resp)
           
static void include(HttpServletRequest req, HttpServletResponse resp, ServletCommand cmd, ServletContext ctx)
          Execute a command after having performed a request dispatch in the target servlet context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandServlet

public CommandServlet()
Method Detail

include

public static void include(HttpServletRequest req,
                           HttpServletResponse resp,
                           ServletCommand cmd,
                           ServletContext ctx)
                    throws java.io.IOException,
                           ServletException
Execute a command after having performed a request dispatch in the target servlet context.

Parameters:
cmd - the command to execute after the inclusion is done
ctx - the target servlet context
Throws:
java.io.IOException
ServletException

doGet

protected void doGet(HttpServletRequest req,
                     HttpServletResponse resp)
              throws ServletException,
                     java.io.IOException
Throws:
ServletException
java.io.IOException

doPost

protected void doPost(HttpServletRequest req,
                      HttpServletResponse resp)
               throws ServletException,
                      java.io.IOException
Throws:
ServletException
java.io.IOException