org.apache.geronimo.console.servlet
Class GenericForwardServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.geronimo.console.servlet.GenericForwardServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class GenericForwardServlet
extends HttpServlet

Servlet that forwards GET and POST requests to a servlet in an alternate context. The servlet path and alternate context are defined in GBeans of type ContextForward, and this one servlet handles the forwarding for all those different paths. NOTE: This does not work for DWR, because it changes the request path info while forwarding, and DWR requires the exact initial request info in order to construct URLs in the data that it returns. It should work to forward to most typical servlets, JSPs, and static content.

See Also:
Serialized Form

Constructor Summary
GenericForwardServlet()
           
 
Method Summary
 void destroy()
           
 void doGet(HttpServletRequest req, HttpServletResponse resp)
           
 void doPost(HttpServletRequest req, HttpServletResponse resp)
           
 void init(ServletConfig config)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericForwardServlet

public GenericForwardServlet()
Method Detail

init

public void init(ServletConfig config)
          throws ServletException
Specified by:
init in interface Servlet
Overrides:
init in class GenericServlet
Throws:
ServletException

destroy

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

doGet

public void doGet(HttpServletRequest req,
                  HttpServletResponse resp)
           throws ServletException,
                  IOException
Overrides:
doGet in class HttpServlet
Throws:
ServletException
IOException

doPost

public void doPost(HttpServletRequest req,
                   HttpServletResponse resp)
            throws ServletException,
                   IOException
Overrides:
doPost in class HttpServlet
Throws:
ServletException
IOException


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.