org.hippoecm.hst.util
Class HstResponseUtils

java.lang.Object
  extended by org.hippoecm.hst.util.HstResponseUtils

public class HstResponseUtils
extends Object

HST Response Utils

Version:
$Id: HstResponseUtils.java 28938 2011-07-13 13:33:30Z aschrijvers $

Method Summary
static void sendRedirect(HstRequest request, HstResponse response, String path)
          Facility method for sending a redirect to a sitemap path.
static void sendRedirect(HstRequest request, HstResponse response, String path, Map<String,String[]> queryParams)
          Facility method for sending a redirect to a sitemap path.
static void sendRedirect(HstRequest request, HstResponse response, String path, Map<String,String[]> queryParams, String characterEncoding)
          Facility method for sending a redirect to a sitemap path.
static void sendRedirectOrForward(HstRequest request, HstResponse response, String path)
          Facility method for sending a redirect if available or forwarding otherwise to a SiteMapItemId.
static void sendRedirectOrForward(HstRequest request, HstResponse response, String path, Map<String,String[]> queryParams)
          Facility method for sending a redirect if available or forwarding otherwise to a SiteMapItemId.
static void sendRedirectOrForward(HstRequest request, HstResponse response, String path, Map<String,String[]> queryParams, String characterEncoding)
          Facility method for sending a redirect if available or forwarding otherwise to a SiteMapItemId.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

sendRedirect

public static void sendRedirect(HstRequest request,
                                HstResponse response,
                                String path)
Facility method for sending a redirect to a sitemap path.

Parameters:
request - the HstRequest
response - the HstResponse
path - the sitemap path you want to redirect to

sendRedirect

public static void sendRedirect(HstRequest request,
                                HstResponse response,
                                String path,
                                Map<String,String[]> queryParams)
Facility method for sending a redirect to a sitemap path.

Parameters:
request - the HstRequest
response - the HstResponse
path - the sitemap path you want to redirect to
queryParams - query parameters to append to the redirection url

sendRedirect

public static void sendRedirect(HstRequest request,
                                HstResponse response,
                                String path,
                                Map<String,String[]> queryParams,
                                String characterEncoding)
Facility method for sending a redirect to a sitemap path.

Parameters:
request - the HstRequest
response - the HstResponse
path - the sitemap path you want to redirect to
queryParams - query parameters to append to the redirection url
characterEncoding - character encoding for query parameters

sendRedirectOrForward

public static void sendRedirectOrForward(HstRequest request,
                                         HstResponse response,
                                         String path)
Facility method for sending a redirect if available or forwarding otherwise to a SiteMapItemId.

Note: When the component is deployed on a normal servlet application, then this method tries to send a redirect if this method is invoked during doAction() or doBeforeRender() methods.
Meanwhile when the component is deployed on a portlet application for a portal, then this method tries to send a redirect if this method is invoked during doAction(), but it tries to forward during doBeforeRender() methods because it is allowed only in the action phase to send a redirect in a portlet.

Parameters:
request - the HstRequest
response - the HstResponse
path - the sitemap path you want to redirect to

sendRedirectOrForward

public static void sendRedirectOrForward(HstRequest request,
                                         HstResponse response,
                                         String path,
                                         Map<String,String[]> queryParams)
Facility method for sending a redirect if available or forwarding otherwise to a SiteMapItemId.

Note: When the component is deployed on a normal servlet application, then this method tries to send a redirect if this method is invoked during doAction() or doBeforeRender() methods.
Meanwhile when the component is deployed on a portlet application for a portal, then this method tries to send a redirect if this method is invoked during doAction(), but it tries to forward during doBeforeRender() methods because it is allowed only in the action phase to send a redirect in a portlet.

Parameters:
request - the HstRequest
response - the HstResponse
path - the sitemap path you want to redirect to
queryParams - query parameters to append to the redirection url

sendRedirectOrForward

public static void sendRedirectOrForward(HstRequest request,
                                         HstResponse response,
                                         String path,
                                         Map<String,String[]> queryParams,
                                         String characterEncoding)
Facility method for sending a redirect if available or forwarding otherwise to a SiteMapItemId.

Note: When the component is deployed on a normal servlet application, then this method tries to send a redirect if this method is invoked during doAction() or doBeforeRender() methods.
Meanwhile when the component is deployed on a portlet application for a portal, then this method tries to send a redirect if this method is invoked during doAction(), but it tries to forward during doBeforeRender() methods because it is allowed only in the action phase to send a redirect in a portlet.

Parameters:
request - the HstRequest
response - the HstResponse
path - the sitemap path you want to redirect to
queryParams - query parameters to append to the redirection url
characterEncoding - character encoding for query parameters


Copyright © 2008-2012 Hippo. All Rights Reserved.