Expresso 5-6

com.jcorporate.expresso.core.controller
Class SecureRequestUtils

java.lang.Object
  extended bycom.jcorporate.expresso.core.controller.SecureRequestUtils

public class SecureRequestUtils
extends Object

Extended the Struts' RequestUtils to add additional utility methods.

Author:
Max Cooper, Steve Ditlinger,Prakash Malani eBuilt Inc.

Constructor Summary
SecureRequestUtils()
           
 
Method Summary
static StringBuffer createQueryStringFromMap(Map m, String ampersand)
          Builds a query string from a given map of parameters
static String getRedirectString(HttpServletRequest request, String httpPort, String httpsPort, boolean isSecure)
          Creates a redirect URL string if the current request should be redirected
static String getRequestParameters(HttpServletRequest aRequest)
          Creates query String from request body parameters
static void reclaimRequestAttributes(HttpServletRequest aRequest, boolean doRemove)
          Reclaims request attributes from session to request
static boolean stowRequestAttributes(HttpServletRequest aRequest)
          Stores request attributes in session
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecureRequestUtils

public SecureRequestUtils()
Method Detail

getRequestParameters

public static String getRequestParameters(HttpServletRequest aRequest)
Creates query String from request body parameters

Parameters:
aRequest - The current request
Returns:
The created query string (with no leading "?")

createQueryStringFromMap

public static StringBuffer createQueryStringFromMap(Map m,
                                                    String ampersand)
Builds a query string from a given map of parameters

Parameters:
m - A map of parameters
ampersand - String to use for ampersands (e.g. "&" or "&" )
Returns:
query string (with no leading "?")

stowRequestAttributes

public static boolean stowRequestAttributes(HttpServletRequest aRequest)
Stores request attributes in session

Parameters:
aRequest - The current request
Returns:
true, if the attributes were stowed in the session, false otherwise

reclaimRequestAttributes

public static void reclaimRequestAttributes(HttpServletRequest aRequest,
                                            boolean doRemove)
Reclaims request attributes from session to request

Parameters:
aRequest - The current request
doRemove - True, if the attributes should be removed after being reclaimed, false otherwise

getRedirectString

public static String getRedirectString(HttpServletRequest request,
                                       String httpPort,
                                       String httpsPort,
                                       boolean isSecure)
Creates a redirect URL string if the current request should be redirected

Parameters:
request - current servlet request
httpPort - the http port used by the web application
httpsPort - the https port used by the web application
isSecure - True if the current request should be transmitted via SSL
Returns:
the URL to redirect to

Expresso 5-6

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