org.mortbay.servlet

Class Forward

Implemented Interfaces:
java.io.Serializable, Servlet, ServletConfig

public class Forward
extends HttpServlet

Forward Servlet Request. This servlet can be configured with init parameters to use a RequestDispatcher to forward requests. The servlet path of a request is used to look for a initparameter of that name. If a parameter is found, it's value is used to get a RequestDispatcher.
Version:
$Id: Forward.java,v 1.9 2005/08/13 00:01:28 gregwilkins Exp $
Author:
Greg Wilkins (gregw)
See Also:
Serialized Form

Method Summary

void
destroy()
Called by the servlet container to indicate to a servlet that the servlet is being taken out of service.
void
doGet(HttpServletRequest sreq, HttpServletResponse sres)
void
doPost(HttpServletRequest sreq, HttpServletResponse sres)
String
getServletInfo()
Returns information about the servlet, such as author, version, and copyright.
void
init(ServletConfig config)
Called by the servlet container to indicate to a servlet that the servlet is being placed into service.

Methods inherited from class javax.servlet.http.HttpServlet

doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service

Methods inherited from class javax.servlet.GenericServlet

destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log, service

Method Details

destroy

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

doGet

public void doGet(HttpServletRequest sreq,
                  HttpServletResponse sres)
            throws ServletException,
                   IOException
Overrides:
doGet in interface HttpServlet

doPost

public void doPost(HttpServletRequest sreq,
                   HttpServletResponse sres)
            throws ServletException,
                   IOException
Overrides:
doPost in interface HttpServlet

getServletInfo

public String getServletInfo()
Specified by:
getServletInfo in interface Servlet
Overrides:
getServletInfo in interface GenericServlet
Returns:
String information about this servlet, by default an empty string

init

public void init(ServletConfig config)
            throws ServletException
Called by the servlet container to indicate to a servlet that the servlet is being placed into service. See Servlet.init(ServletConfig).

This implementation stores the ServletConfig object it receives from the servlet container for later use. When overriding this form of the method, call super.init(config).

Specified by:
init in interface Servlet
Overrides:
init in interface GenericServlet
Parameters:
config - the ServletConfig object that contains configutation information for this servlet
Throws:
ServletException - if an exception occurs that interrupts the servlet's normal operation

Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.