org.mortbay.servlet
Class Forward
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.mortbay.servlet.Forward
- All 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
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Forward
public Forward()
init
public void init(ServletConfig config)
throws ServletException
- Description copied from class:
GenericServlet
- Called by the servlet container to indicate to a servlet that the
servlet is being placed into service. See
Servlet.init(javax.servlet.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 class 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- See Also:
UnavailableException
doPost
public void doPost(HttpServletRequest sreq,
HttpServletResponse sres)
throws ServletException,
java.io.IOException
- Parameters:
sreq - an HttpServletRequest object that
contains the request the client has made of the servletsres - an HttpServletResponse object that
contains the response the servlet sends to the client
- Throws:
java.io.IOException - if an input or output error is
detected when the servlet handles the request
ServletException - if the request for the POST
could not be handled- See Also:
ServletOutputStream,
ServletResponse.setContentType(java.lang.String)
doGet
public void doGet(HttpServletRequest sreq,
HttpServletResponse sres)
throws ServletException,
java.io.IOException
- Parameters:
sreq - an HttpServletRequest object that
contains the request the client has made of the servletsres - an HttpServletResponse object that
contains the response the servlet sends to the client
- Throws:
ServletException - if the request for the GET
could not be handled
java.io.IOException - if an input or output error is
detected when the servlet handles the GET request- See Also:
ServletResponse.setContentType(java.lang.String)
getServletInfo
public java.lang.String getServletInfo()
- Description copied from class:
GenericServlet
- Returns information about the servlet, such as
author, version, and copyright.
By default, this method returns an empty string. Override this method
to have it return a meaningful value. See
Servlet.getServletInfo().
- Specified by:
getServletInfo in interface Servlet- Overrides:
getServletInfo in class GenericServlet
- Returns:
- String information about this servlet, by default an
empty string
destroy
public void destroy()
- Description copied from class:
GenericServlet
- Called by the servlet container to indicate to a servlet that the
servlet is being taken out of service. See
Servlet.destroy().
- Specified by:
destroy in interface Servlet- Overrides:
destroy in class GenericServlet
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.