Expresso 5-5-0

com.jcorporate.expresso.core.jsdkapi
Interface APIAwareDispatcher


public interface APIAwareDispatcher

Servlet API 2.0 does not have the RequestDispatcher interface. Apache-JServ is based on Servlet API 2.0. For those users that are using JServ, this interface allows the use of the RequestDispatcher forward() and include() methods by hiding the API differences between the Servlet API 2.0 and 2.1 This class is used in conjunction with the com.jcorporate.expresso.core.jsdkapi.GenericDispatcher class.

Author:
Shash Chatterjee

Method Summary
 void forward(Servlet srv, ServletContext ctx, HttpServletRequest req, HttpServletResponse res, String URL)
          This method is used to forward to a new URL
 String getContextPath(HttpServletRequest req)
          Retrieve the context path.
 void include(Servlet srv, ServletContext param, HttpServletRequest req, HttpServletResponse res, String URL)
          Insert the method's description here.
 

Method Detail

forward

public void forward(Servlet srv,
                    ServletContext ctx,
                    HttpServletRequest req,
                    HttpServletResponse res,
                    String URL)
             throws ServletException,
                    IOException
This method is used to forward to a new URL

Parameters:
srv - javax.servlet.Servlet - The servlet which is using this method, usually the "this" attribute. Used to extract the PrintWriter.
ctx - javax.servlet.ServletContext - The servlet context of the calling servlet.
req - javax.servlet.http.HttpServletRequest - The request object associated with this service call
res - javax.servlet.http.HttpServletResponse - The response object associated with this service call.
URL - java.lang.String - The URL to forward to
Throws:
ServletException - The exception description.
IOException - The exception description.

include

public void include(Servlet srv,
                    ServletContext param,
                    HttpServletRequest req,
                    HttpServletResponse res,
                    String URL)
             throws ServletException,
                    IOException
Insert the method's description here. Creation date: (04/16/00 %r)

Parameters:
srv - javax.servlet.Servlet - The servlet which is using this method, usually the "this" attribute. Used to extract the PrintWriter.
param - javax.servlet.ServletContext - The servlet context of the calling servlet.
req - javax.servlet.http.ServletRequest - The request object associated with this service call
res - javax.servlet.http.ServletResponse - The response object associated with this service call.
URL - java.lang.String - The URL to include
Throws:
ServletException - The exception description.
IOException - The exception description.

getContextPath

public String getContextPath(HttpServletRequest req)
Retrieve the context path.

Parameters:
req - the HttpServletRequest object
Returns:
String for the context path

Expresso 5-5-0

Please see www.jcorporate.com for information about new Expresso releases.