com.arsdigita.dispatcher
Class DispatcherHelper

java.lang.Object
  extended bycom.arsdigita.dispatcher.DispatcherHelper
All Implemented Interfaces:
com.arsdigita.dispatcher.DispatcherConstants

public final class DispatcherHelper
extends Object
implements com.arsdigita.dispatcher.DispatcherConstants

Class static helper methods for request dispatching. Contains various generally useful procedural abstractions.

Since:
4.5
Version:
ACS 4.5
Author:
Bill Schneider

Field Summary
static String DISPATCHER_PREFIX_ATTR
           
static String ERROR_REQUEST_ATTRIBUTE
          Attribute name for the URI that caused an error when the servlet container forwards to an error page.
static String INCLUDE_URI
          The attribute name for an included resource URI after a servlet include (nesting).
static String JSP_EXCEPTION_ATTRIBUTE
          Attribute name for the Throwable object saved when a JSP handles an error with the errorPage directive.
static String ORIGINAL_REQUEST_ATTR
          The attribute where we store the original HttpServletRequest object when we need to wrap the servlet request.
static String REDIRECT_SEMAPHORE
          The session attribute where we store an identifier for the previous request that made a redirect.
static String REENTRANCE_ATTRIBUTE
          Attribute name to indicate that the dispatcher is within a request--that is, request start listeners have run but request end listeners haven't yet.
static String REQUEST_CONTEXT_ATTR
          The attribute where we store the current RequestContext object.
static SimpleDateFormat rfc1123_formatter
           
static String versionId
           
static String WELCOME_FILES
          The application attribute (in ServletContext) where we store the list of welcome files from web.xml.
static String WRAPPED_REQUEST_ATTR
          The attribute where we store the wrapped servlet request object when we need to restore the original request object for a forward/include.
 
Method Summary
static void abortRequest()
          Aborts all processing of the current request and treat it as successfully completed.
static void addParameterProvider(ParameterProvider provider)
          Deprecated. use URLRewriter.addParameterProvider
static void cacheDisable(javax.servlet.http.HttpServletResponse response)
          Aggressively disable all caching of the response
static void cacheForUser(javax.servlet.http.HttpServletResponse response)
          Allow caching of the response for this user only, as identified by the Cookie header.
static void cacheForUser(javax.servlet.http.HttpServletResponse response, Date expiry)
          Allowing caching of the response for this user only.
static void cacheForUser(javax.servlet.http.HttpServletResponse response, int maxage)
          Allow caching of the response for this user only, as identified by the Cookie header.
static void cacheForWorld(javax.servlet.http.HttpServletResponse response)
          Allow caching of this response for anyone in the world.
static void cacheForWorld(javax.servlet.http.HttpServletResponse response, Date expiry)
          Allow caching of this response for anyone in the world.
static void cacheForWorld(javax.servlet.http.HttpServletResponse response, int maxage)
          Allow caching of this response for anyone in the world.
static void clearParameterProviders()
          Deprecated. use URLRewriter#clearParameterProviders() instead
static String encodeURL(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, String url)
          Deprecated. use URLRewriter.encodeURL instead
static void forceCacheDisable(javax.servlet.http.HttpServletResponse response)
           
static void forwardRequestByName(String name, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          Equivalent to forwardRequestByName(name, req, resp, DispatcherHelper.getRequestContext(req).getServletContext()).
static void forwardRequestByName(String name, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, javax.servlet.ServletContext sctx)
          Forwards the request from this resource to a servlet resource (named in server.xml) at the servlet-container level.
static void forwardRequestByPath(String path, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          Equivalent to forwardRequestByPath(path, req, resp, DispatcherHelper.getRequestContext(req).getServletContext()).
static void forwardRequestByPath(String path, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, javax.servlet.ServletContext sctx)
          Forwards the request from this resource to another resource at the servlet-container level.
static void forwardRequestByPath(String path, javax.servlet.jsp.PageContext pageContext)
          Forwards the request from this resource to another resource at the JSP container level.
static DispatcherConfig getConfig()
          This returns a reference to the dispatcher configuration file
static String getCurrentResourcePath(javax.servlet.http.HttpServletRequest req)
          Returns the URL path (relative to the webapp root) for the current (calling) resource.
static int getDefaultCacheExpiry()
           
static String getDispatcherPrefix(javax.servlet.http.HttpServletRequest req)
           
static Set getGlobalModels()
          Deprecated. use URLRewriter.getGlobalModels instead
static Set getGlobalParams(javax.servlet.http.HttpServletRequest req)
          Deprecated. use URLRewriter.getGlobalParams instead
static javax.servlet.http.HttpServletRequest getRequest()
          Gets the current HttpServletRequest for this thread.
static RequestContext getRequestContext()
           
static RequestContext getRequestContext(javax.servlet.http.HttpServletRequest req)
          Gets the application context from the request attributes.
static String getStaticURL()
          Returns a global URL prefix for referencing static assets (images, CSS, etc.) on disk in href attributes.
static String getWebappContext()
          Gets the webapp Context using the following procedure: 1.
static boolean isCachingActive()
           
static void maybeCacheDisable(javax.servlet.http.HttpServletResponse response)
          If no existing cache policy is set, then call cacheDisable to disable all caching of the response.
static void maybeCacheForUser(javax.servlet.http.HttpServletResponse response)
          If no existing cache policy is set, then call cacheForUser to enable caching for a user
static void maybeCacheForUser(javax.servlet.http.HttpServletResponse response, Date expiry)
          If no existing cache policy is set, then call cacheForUser to enable caching for a user
static void maybeCacheForUser(javax.servlet.http.HttpServletResponse response, int maxage)
          If no existing cache policy is set, then call cacheForUser to enable caching for a user
static void maybeCacheForWorld(javax.servlet.http.HttpServletResponse response)
          If no existing cache policy is set, then call cacheForUser to enable caching for the world.
static void maybeCacheForWorld(javax.servlet.http.HttpServletResponse response, Date expiry)
          If no existing cache policy is set, then call cacheForUser to enable caching for the world
static void maybeCacheForWorld(javax.servlet.http.HttpServletResponse response, int maxage)
          If no existing cache policy is set, then call cacheForUser to enable caching for the world
static javax.servlet.http.HttpServletRequest maybeWrapRequest(javax.servlet.http.HttpServletRequest sreq)
          This method will optionally wrap the request if it is a multipart POST, or restore the original wrapper if it was already wrapped
static String prepareURL(String url, javax.servlet.http.HttpServletRequest req)
          Deprecated. This method does not encode the servlet session ID. Use encodeURL(req, res, url) instead.
static String resolveAbstractFile(File abstractFile, RequestContext actx)
          Deprecated. abstract URLs are no longer supported. Use extensions when your file on disk has an extension.
static javax.servlet.http.HttpServletRequest restoreOriginalRequest(javax.servlet.http.HttpServletRequest req)
          If the given servlet request is wrapped in one of our own classes, returns the original (unwrapped) request object and stores a reference to the request wrapper in the request attributes of the returned request.
static javax.servlet.http.HttpServletRequest restoreRequestWrapper(javax.servlet.http.HttpServletRequest req)
          If we've stored a reference to a request wrapper as a request attribute to the current servlet request, returns the wrapper object.
static void saveOriginalRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletRequest oldReq)
          Stores req as request attribute of oldReq.
static void sendExternalRedirect(javax.servlet.http.HttpServletResponse resp, String url)
          Redirects the client to the given URL without rewriting it.
static void sendRedirect(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, String url)
          Rewrites the given URL and redirects the client to the rewritten URL.
static void sendRedirect(javax.servlet.http.HttpServletResponse resp, String url)
          Deprecated. This method does not rewrite URLs. Use sendRedirect(HttpServletRequest, HttpServletResponse, String) for redirects within this ACS or sendExternalRedirect(HttpServletResponse, String) for redirects to sites outside this ACS.
static void setDispatcherPrefix(javax.servlet.http.HttpServletRequest req, String val)
           
static void setRequest(javax.servlet.http.HttpServletRequest r)
          Stores the HttpServletRequest in a ThreadLocal so that it can be accessed globally.
static void setRequestContext(javax.servlet.http.HttpServletRequest req, RequestContext ac)
          Sets the current request context as a request attribute for later retrieval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rfc1123_formatter

public static final SimpleDateFormat rfc1123_formatter

versionId

public static final String versionId
See Also:
Constant Field Values

JSP_EXCEPTION_ATTRIBUTE

public static final String JSP_EXCEPTION_ATTRIBUTE
Attribute name for the Throwable object saved when a JSP handles an error with the errorPage directive.

See Also:
Constant Field Values

ERROR_REQUEST_ATTRIBUTE

public static final String ERROR_REQUEST_ATTRIBUTE
Attribute name for the URI that caused an error when the servlet container forwards to an error page.

See Also:
Constant Field Values

REENTRANCE_ATTRIBUTE

public static final String REENTRANCE_ATTRIBUTE
Attribute name to indicate that the dispatcher is within a request--that is, request start listeners have run but request end listeners haven't yet.

See Also:
Constant Field Values

INCLUDE_URI

public static final String INCLUDE_URI
The attribute name for an included resource URI after a servlet include (nesting).

See Also:
Constant Field Values

REQUEST_CONTEXT_ATTR

public static final String REQUEST_CONTEXT_ATTR
The attribute where we store the current RequestContext object.

See Also:
Constant Field Values

ORIGINAL_REQUEST_ATTR

public static final String ORIGINAL_REQUEST_ATTR
The attribute where we store the original HttpServletRequest object when we need to wrap the servlet request.

See Also:
Constant Field Values

WRAPPED_REQUEST_ATTR

public static final String WRAPPED_REQUEST_ATTR
The attribute where we store the wrapped servlet request object when we need to restore the original request object for a forward/include.

See Also:
Constant Field Values

REDIRECT_SEMAPHORE

public static final String REDIRECT_SEMAPHORE
The session attribute where we store an identifier for the previous request that made a redirect. This prohibits us from following a redirect until after the request that generated the redirect commits its transaction.

See Also:
Constant Field Values

WELCOME_FILES

public static final String WELCOME_FILES
The application attribute (in ServletContext) where we store the list of welcome files from web.xml.

See Also:
Constant Field Values

DISPATCHER_PREFIX_ATTR

public static final String DISPATCHER_PREFIX_ATTR
See Also:
Constant Field Values
Method Detail

getDefaultCacheExpiry

public static int getDefaultCacheExpiry()

isCachingActive

public static boolean isCachingActive()

getCurrentResourcePath

public static String getCurrentResourcePath(javax.servlet.http.HttpServletRequest req)
Returns the URL path (relative to the webapp root) for the current (calling) resource. This works around the quirk that, if servlet A includes servlet B, calling getRequestURI() in B returns "A" and not "B".

Returns:
the URL path (relative to the webapp root) for the currently executing resource.

getRequestContext

public static RequestContext getRequestContext(javax.servlet.http.HttpServletRequest req)
Gets the application context from the request attributes.

Returns:
the application context from the request attributes.

getRequestContext

public static RequestContext getRequestContext()

getDispatcherPrefix

public static String getDispatcherPrefix(javax.servlet.http.HttpServletRequest req)

setDispatcherPrefix

public static void setDispatcherPrefix(javax.servlet.http.HttpServletRequest req,
                                       String val)

setRequestContext

public static void setRequestContext(javax.servlet.http.HttpServletRequest req,
                                     RequestContext ac)
Sets the current request context as a request attribute for later retrieval.

Parameters:
req - the current request object
ac - the current request context

forwardRequestByPath

public static void forwardRequestByPath(String path,
                                        javax.servlet.http.HttpServletRequest req,
                                        javax.servlet.http.HttpServletResponse resp,
                                        javax.servlet.ServletContext sctx)
                                 throws IOException,
                                        javax.servlet.ServletException
Forwards the request from this resource to another resource at the servlet-container level. This is a wrapper for javax.servlet.RequestDispatcher and is intended to hide the fact that you can't "forward" a request once you've done an "include" in it.

Parameters:
path - the URL of the resource, relative to the webapp root. For example, if you request a JSP page with /context/foo/bar, you would call this method with path == /foo/bar.
req - the current request
resp - the current response
sctx - the current servlet context
Throws:
IOException - may be propagated from target resource
javax.servlet.ServletException - may be propagated from target resource

forwardRequestByPath

public static void forwardRequestByPath(String path,
                                        javax.servlet.http.HttpServletRequest req,
                                        javax.servlet.http.HttpServletResponse resp)
                                 throws IOException,
                                        javax.servlet.ServletException
Equivalent to forwardRequestByPath(path, req, resp, DispatcherHelper.getRequestContext(req).getServletContext()).

Throws:
IOException
javax.servlet.ServletException

forwardRequestByPath

public static void forwardRequestByPath(String path,
                                        javax.servlet.jsp.PageContext pageContext)
                                 throws IOException,
                                        javax.servlet.ServletException
Forwards the request from this resource to another resource at the JSP container level. This is a wrapper for PageContext.forward and PageContext.include and is intended to transparently switch between "forward" and "include" depending on whether or not an include has already been done on the request.

Parameters:
path - the URL of the resource, relative to the webapp root. For example, if you request a JSP page with /context/foo/bar, you would call this method with path == /foo/bar.
pageContext - the JSP page context
Throws:
IOException - may be propagated from target resource
javax.servlet.ServletException - may be propagated from target resource

forwardRequestByName

public static void forwardRequestByName(String name,
                                        javax.servlet.http.HttpServletRequest req,
                                        javax.servlet.http.HttpServletResponse resp,
                                        javax.servlet.ServletContext sctx)
                                 throws IOException,
                                        javax.servlet.ServletException
Forwards the request from this resource to a servlet resource (named in server.xml) at the servlet-container level. This is a wrapper for javax.servlet.RequestDispatcher and is intended to hide the fact that you can't "forward" a request once you've done an "include" in it.

Parameters:
name - the named servlet to forward to
req - the current request
resp - the current response
sctx - the current servlet context
Throws:
IOException - may be propagated from target resource
javax.servlet.ServletException - may be propagated from target resource

forwardRequestByName

public static void forwardRequestByName(String name,
                                        javax.servlet.http.HttpServletRequest req,
                                        javax.servlet.http.HttpServletResponse resp)
                                 throws IOException,
                                        javax.servlet.ServletException
Equivalent to forwardRequestByName(name, req, resp, DispatcherHelper.getRequestContext(req).getServletContext()).

Throws:
IOException
javax.servlet.ServletException

resolveAbstractFile

public static String resolveAbstractFile(File abstractFile,
                                         RequestContext actx)
                                  throws RedirectException,
                                         DirectoryListingException,
                                         FileNotFoundException
Deprecated. abstract URLs are no longer supported. Use extensions when your file on disk has an extension.

Unsupported Given the name of a resource in the file system that is missing an extension, picks an extension that matches. Serves a file with a .jsp extension first, if available. Otherwise picks any file that matches. For directories, it tacks on the "index" filename plus the extension.

Parameters:
abstractFile - the extensionless file
actx - the current application context
Returns:
a filename suffix (".jsp", "index.html", etc.) such that (abstractFile.getAbsolutePath() + suffix) is a valid file in the filesystem
Throws:
RedirectException - if the requested file is a directory and the original request URL does not end with a trailing slash.
FileNotFoundException - if no matching file exists.
DirectoryListingException

restoreOriginalRequest

public static javax.servlet.http.HttpServletRequest restoreOriginalRequest(javax.servlet.http.HttpServletRequest req)
If the given servlet request is wrapped in one of our own classes, returns the original (unwrapped) request object and stores a reference to the request wrapper in the request attributes of the returned request. Otherwise just returns the request object.

Parameters:
req - the servlet request
Returns:
the original servlet request object, as created by the servlet container. This can be used as a parameter for forward().

restoreRequestWrapper

public static javax.servlet.http.HttpServletRequest restoreRequestWrapper(javax.servlet.http.HttpServletRequest req)
If we've stored a reference to a request wrapper as a request attribute to the current servlet request, returns the wrapper object. Otherwise, returns the request object.

Parameters:
req - the current servlet request
Returns:
the previously created wrapper around the current servlet request, if any; otherwise returns the request object.

maybeWrapRequest

public static javax.servlet.http.HttpServletRequest maybeWrapRequest(javax.servlet.http.HttpServletRequest sreq)
                                                              throws IOException,
                                                                     javax.servlet.ServletException
This method will optionally wrap the request if it is a multipart POST, or restore the original wrapper if it was already wrapped

Throws:
IOException
javax.servlet.ServletException

saveOriginalRequest

public static void saveOriginalRequest(javax.servlet.http.HttpServletRequest req,
                                       javax.servlet.http.HttpServletRequest oldReq)
Stores req as request attribute of oldReq.

Parameters:
req - the current servlet request (wrapper)
oldReq - the original servlet request

sendRedirect

public static void sendRedirect(javax.servlet.http.HttpServletResponse resp,
                                String url)
                         throws IOException
Deprecated. This method does not rewrite URLs. Use sendRedirect(HttpServletRequest, HttpServletResponse, String) for redirects within this ACS or sendExternalRedirect(HttpServletResponse, String) for redirects to sites outside this ACS.

Redirects the client to the given URL without rewriting it. Delegates to the sendExternalRedirect method.

Parameters:
resp - the current response
url - the destination URL for redirect
Throws:
IOException

sendRedirect

public static void sendRedirect(javax.servlet.http.HttpServletRequest req,
                                javax.servlet.http.HttpServletResponse resp,
                                String url)
                         throws IOException
Rewrites the given URL and redirects the client to the rewritten URL. This method should be used for redirects within this ACS.

Parameters:
req - the current request; used as a source for parameters for URL rewriting
resp - the current response
url - the destination URL for redirect
Throws:
IOException

sendExternalRedirect

public static void sendExternalRedirect(javax.servlet.http.HttpServletResponse resp,
                                        String url)
                                 throws IOException
Redirects the client to the given URL without rewriting it. This method should be used for redirects to sites outside this ACS.

Parameters:
resp - the current response
url - the destination URL for redirect
Throws:
IOException

addParameterProvider

public static void addParameterProvider(ParameterProvider provider)
Deprecated. use URLRewriter.addParameterProvider

Adds a ParameterProvider to the URLRewriter engine. ParameterProviders are used when encodeRedirectURL and encodeURL are called. They add global state parameters like the session ID (for cookieless login) to URLs for links and redirects.

Parameters:
provider - the parameter provider to add
See Also:
URLRewriter.addParameterProvider(com.arsdigita.util.ParameterProvider)

clearParameterProviders

public static void clearParameterProviders()
Deprecated. use URLRewriter#clearParameterProviders() instead

Clears all parameter providers.

See Also:
URLRewriter.clearParameterProviders()

getGlobalModels

public static Set getGlobalModels()
Deprecated. use URLRewriter.getGlobalModels instead

Returns the set of global parameter models, or the empty set if no provider is set.

Returns:
a set of Bebop parameter models.
See Also:
URLRewriter.getGlobalModels()

getGlobalParams

public static Set getGlobalParams(javax.servlet.http.HttpServletRequest req)
Deprecated. use URLRewriter.getGlobalParams instead

Returns the set of global URL parameters for the given request, or the empty set if no provider is set.

Parameters:
req - the current request
Returns:
a Set of Bebop parameter data.

prepareURL

public static String prepareURL(String url,
                                javax.servlet.http.HttpServletRequest req)
Deprecated. This method does not encode the servlet session ID. Use encodeURL(req, res, url) instead.

Prepares the given URL for a client link. If no providers are set, has no effect.

Parameters:
url - the target URL to prepare
Returns:
the prepared URL with global parameters added from providers

encodeURL

public static String encodeURL(javax.servlet.http.HttpServletRequest req,
                               javax.servlet.http.HttpServletResponse resp,
                               String url)
Deprecated. use URLRewriter.encodeURL instead

Encodes the given URL for the client. Adds ACS global parameters and servlet session parameters to the URL. If the URL will be used for redirection, use sendRedirect(req, resp, url) instead.

Parameters:
req - the current request
resp - the current response
url - the target URL (for a link) to encode
Returns:
the new URL, with extra URL variables added from parameter providers
See Also:
URLRewriter

getStaticURL

public static String getStaticURL()
Returns a global URL prefix for referencing static assets (images, CSS, etc.) on disk in href attributes. This can be on the same server ("/STATIC/") or a different server/port ("http://server:port/dir/"). The return value is guaranteed to end with a trailing slash. Usage example:
 String pathToImage = DispatcherHelper.getStaticURL() + "images/pic.gif";
 Image img = new Image(pathToImage);
 

Returns:
a URL prefix ending with a trailing slash.

getWebappContext

public static String getWebappContext()
Gets the webapp Context using the following procedure: 1. If there is a request, get the value from the request. 2. If there is no request, get the value saved from a previous request. 3. If there is no request or previous request, use the value specified by the enterprise.init webappContext parameter. 4. Lastly, return null.


abortRequest

public static void abortRequest()
Aborts all processing of the current request and treat it as successfully completed. We abort the request by percolating an unchecked Error up through the call stack. Then the BaseDispatcherServlet.service method traps this and commits whatever DML has already happened on the transaction.

Throws:
AbortRequestSignal - Error thrown to abort current request

setRequest

public static void setRequest(javax.servlet.http.HttpServletRequest r)
Stores the HttpServletRequest in a ThreadLocal so that it can be accessed globally.


getRequest

public static javax.servlet.http.HttpServletRequest getRequest()
Gets the current HttpServletRequest for this thread.

Returns:
the current HttpServletRequest for this thread.

maybeCacheDisable

public static void maybeCacheDisable(javax.servlet.http.HttpServletResponse response)
If no existing cache policy is set, then call cacheDisable to disable all caching of the response.


cacheDisable

public static void cacheDisable(javax.servlet.http.HttpServletResponse response)
Aggressively disable all caching of the response


forceCacheDisable

public static void forceCacheDisable(javax.servlet.http.HttpServletResponse response)

maybeCacheForUser

public static void maybeCacheForUser(javax.servlet.http.HttpServletResponse response)
If no existing cache policy is set, then call cacheForUser to enable caching for a user


cacheForUser

public static void cacheForUser(javax.servlet.http.HttpServletResponse response)
Allow caching of the response for this user only, as identified by the Cookie header. The response will expire according to the default age setting


maybeCacheForUser

public static void maybeCacheForUser(javax.servlet.http.HttpServletResponse response,
                                     int maxage)
If no existing cache policy is set, then call cacheForUser to enable caching for a user

Parameters:
maxage - the max time in second until this expires

maybeCacheForUser

public static void maybeCacheForUser(javax.servlet.http.HttpServletResponse response,
                                     Date expiry)
If no existing cache policy is set, then call cacheForUser to enable caching for a user

Parameters:
expiry - the time at which to expire

cacheForUser

public static void cacheForUser(javax.servlet.http.HttpServletResponse response,
                                int maxage)
Allow caching of the response for this user only, as identified by the Cookie header. The response will expire in 'age' seconds time.

Parameters:
maxage - the max life of the response in seconds

cacheForUser

public static void cacheForUser(javax.servlet.http.HttpServletResponse response,
                                Date expiry)
Allowing caching of the response for this user only. The response will expire at time given in the expiry parameter

Parameters:
expiry - time at which to expire

maybeCacheForWorld

public static void maybeCacheForWorld(javax.servlet.http.HttpServletResponse response)
If no existing cache policy is set, then call cacheForUser to enable caching for the world. The response expiry will take the default age setting


cacheForWorld

public static void cacheForWorld(javax.servlet.http.HttpServletResponse response)
Allow caching of this response for anyone in the world. The response take the default expiry time


maybeCacheForWorld

public static void maybeCacheForWorld(javax.servlet.http.HttpServletResponse response,
                                      int maxage)
If no existing cache policy is set, then call cacheForUser to enable caching for the world

Parameters:
maxage - the time in seconds until expiry

maybeCacheForWorld

public static void maybeCacheForWorld(javax.servlet.http.HttpServletResponse response,
                                      Date expiry)
If no existing cache policy is set, then call cacheForUser to enable caching for the world

Parameters:
expiry - the time at which it will expire

cacheForWorld

public static void cacheForWorld(javax.servlet.http.HttpServletResponse response,
                                 int maxage)
Allow caching of this response for anyone in the world. The response will expire at the current time plus maxage seconds.

Parameters:
maxage - time in seconds until this expires

cacheForWorld

public static void cacheForWorld(javax.servlet.http.HttpServletResponse response,
                                 Date expiry)
Allow caching of this response for anyone in the world. THe response will expire at the time given.


getConfig

public static DispatcherConfig getConfig()
This returns a reference to the dispatcher configuration file



Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC