Expresso 5-6

com.jcorporate.expresso.core.jsdkapi
Class GenericDispatcher

java.lang.Object
  extended bycom.jcorporate.expresso.core.jsdkapi.GenericDispatcher

public class GenericDispatcher
extends Object

As we no longer support the 2.0 Servlet API, this class is just a wrapper to the appropriate methods, as they do not vary between 2.1 thru 2.3 of the API.

IMPORTANT: The URL's for "forward" and "include" are RELATIVE to the context root (even if they begin with "/").

Author:
Shash Chatterjee

Constructor Summary
GenericDispatcher()
           
 
Method Summary
static void forward(HttpServletRequest req, HttpServletResponse res, String URL)
          This method is used to forward to a new URL
static String getContextPath(HttpServletRequest req)
          API 2.2 actually implements the getContextPath method, so we return the result directly.
static void include(HttpServletRequest req, HttpServletResponse res, String URL)
          This method is used to include the contents of a URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericDispatcher

public GenericDispatcher()
Method Detail

forward

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

Parameters:
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 - relative to the current web-app context root
Throws:
ServletException - The exception description.
IOException - The exception description.

include

public static void include(HttpServletRequest req,
                           HttpServletResponse res,
                           String URL)
                    throws ServletException,
                           IOException
This method is used to include the contents of a URL.

Parameters:
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 - relative to the current web-app context root
Throws:
ServletException - The exception description.
IOException - The exception description.

getContextPath

public static String getContextPath(HttpServletRequest req)
API 2.2 actually implements the getContextPath method, so we return the result directly.

Parameters:
req - The HttpServletRequest object
Returns:
java.lang.String

Expresso 5-6

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