/** * Facility method for sending a redirect if available or forwarding otherwise to a SiteMapItemId. * <P> * <EM> * 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. * <BR/> * 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. * </EM> * </P> * * @param request the HstRequest * @param response the HstResponse * @param path the sitemap path you want to redirect to */ public static void sendRedirectOrForward(HstRequest request, HstResponse response, String path) { sendRedirectOrForward(request, response, path, null, null); }
/** * Facility method for sending a redirect if available or forwarding otherwise to a SiteMapItemId. * <P> * <EM> * 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. * <BR/> * 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. * </EM> * </P> * * @param request the HstRequest * @param response the HstResponse * @param path the sitemap path you want to redirect to * @param queryParams query parameters to append to the redirection url */ public static void sendRedirectOrForward(HstRequest request, HstResponse response, String path, Map<String, String []> queryParams) { sendRedirectOrForward(request, response, path, queryParams, null); }