uPortal 2.4.1
API Documentation

org.jasig.portal.utils
Class URLUtil

java.lang.Object
  extended byorg.jasig.portal.utils.URLUtil

public class URLUtil
extends java.lang.Object

The URLUtil class offers static helper methods for manipulating the request parameters and URLs of both HTTP GET and HTTP POST requests and performing redirections based on the new parameters and URLs. and request parameters.

Version:
$Revision: 1.6.2.1 $
Author:
Andreas Christoforides, achristoforides@unicon.net, Nick Bolton, nbolton@unicon.net

Field Summary
static java.lang.String HTTP_GET_REQUEST
           
static java.lang.String HTTP_POST_REQUEST
           
static int REDIRECT_URL_LIMIT
           
 
Constructor Summary
URLUtil()
           
 
Method Summary
static void redirect(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, java.lang.String targetNodeId, boolean asRoot, java.lang.String[] ignoreParams, java.lang.String charset)
          Performs a redirect for both HTTP GET and HTTP POST requests based on the the specified target channel and parameters to be ignored.
static void redirectGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, UPFileSpec up, java.lang.String[] ignoreParams)
          Performs a HTTP GET redirect using the specified UPFileSpec and parameters to be ignored.
static void redirectPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, UPFileSpec up, java.lang.String[] ignoreParams, java.lang.String charset)
          Performs a HTTP POST redirect using the specified UPFileSpec and parameters to be ignored.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REDIRECT_URL_LIMIT

public static final int REDIRECT_URL_LIMIT
See Also:
Constant Field Values

HTTP_GET_REQUEST

public static final java.lang.String HTTP_GET_REQUEST
See Also:
Constant Field Values

HTTP_POST_REQUEST

public static final java.lang.String HTTP_POST_REQUEST
See Also:
Constant Field Values
Constructor Detail

URLUtil

public URLUtil()
Method Detail

redirect

public static void redirect(javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse res,
                            java.lang.String targetNodeId,
                            boolean asRoot,
                            java.lang.String[] ignoreParams,
                            java.lang.String charset)
                     throws PortalException
Performs a redirect for both HTTP GET and HTTP POST requests based on the the specified target channel and parameters to be ignored.

Parameters:
req - An HttpServletRequest object.
res - An HttpServletResponse object.
targetNodeId - The target node Id of a channel.
ignoreParams - An array of String objects containing the parameters to be ignored.
Throws:
PortalException

redirectGet

public static void redirectGet(javax.servlet.http.HttpServletRequest req,
                               javax.servlet.http.HttpServletResponse res,
                               UPFileSpec up,
                               java.lang.String[] ignoreParams)
                        throws PortalException
Performs a HTTP GET redirect using the specified UPFileSpec and parameters to be ignored.

Parameters:
req - An HttpServletRequest object.
res - An HttpServletResponse object.
up - the uPortal file spec.
ignoreParams - An array of String objects containing the parameters to be ignored.
Throws:
PortalException

redirectPost

public static void redirectPost(javax.servlet.http.HttpServletRequest req,
                                javax.servlet.http.HttpServletResponse res,
                                UPFileSpec up,
                                java.lang.String[] ignoreParams,
                                java.lang.String charset)
                         throws PortalException
Performs a HTTP POST redirect using the specified UPFileSpec and parameters to be ignored.

Parameters:
req - An HttpServletRequest object.
res - An HttpServletResponse object.
up - the uPortal file spec.
ignoreParams - An array of String objects containing the parameters to be ignored.
Throws:
PortalException

uPortal 2.4.1
API Documentation