Expresso 5-6

com.jcorporate.expresso.core.misc
Class HTTPUtil

java.lang.Object
  extended bycom.jcorporate.expresso.core.misc.HTTPUtil

public class HTTPUtil
extends Object

This utility class includes static methods for manipulating URLs. Specifically, this class is used to set the expresso.continueURL session object, to retrieve the continueURL object, to qualify Expresso next parameters, etc.

Creation date: (9/14/00 10:28:34 PM)

Author:
Adam Rossi, PlatinumSolutions

Constructor Summary
HTTPUtil()
          HTTPUtil constructor comment.
 
Method Summary
static String getBackURL(HttpServletRequest request)
          Return the "back" URL, usually displayed at the bottom of the servlet page to provide the user a way to go back to the page they called the servlet from
static String getContinueURL(HttpServletRequest request)
          Return the name of the URL to "continue" to from this servlet,
static String getNextURI(HttpServletRequest req)
          Creation date: (9/26/00 12:21:19 PM)
static String qualifyURLIfNeeded(String url, HttpServletRequest req)
          We always want expresso.continueURL objects to be fully qualified.
static void setBackURL(HttpServletRequest request)
          The "back" URL is used at the bottom of servlets to offer the user a quick way to go "back" to the page they started from e.g. before they requested the current servlet.
static void setBackURL(String newURL, HttpServletRequest request)
          The "back" URL is used at the bottom of servlets to offer the user a quick way to go "back" to the page they started from e.g. before they requested the current servlet.
static void setContinueURL(HttpServletRequest req)
          We use this method to set the current location as the continueURL.
static void setContinueURL(HttpServletRequest req, HttpServletResponse res)
          We use this method to set the current location as the continueURL.
static void setContinueURL(String newURL, HttpServletRequest request)
           
static void setContinueURL(String newURL, HttpServletRequest request, HttpServletResponse response)
          Override the normal "next" parameter to go somewhere else
static void setContinueURLFromQueryString(HttpServletRequest req)
          set the continue URL from a query string "next" parameter Creation date: (12/17/00 2:24:49 PM)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPUtil

public HTTPUtil()
HTTPUtil constructor comment.

Method Detail

getContinueURL

public static String getContinueURL(HttpServletRequest request)
                             throws ServletException
Return the name of the URL to "continue" to from this servlet,

Parameters:
request -
Returns:
String
Throws:
ServletException

getNextURI

public static String getNextURI(HttpServletRequest req)
Creation date: (9/26/00 12:21:19 PM)

Parameters:
req - javax.servlet.http.HttpServletRequest
Returns:
java.lang.String

qualifyURLIfNeeded

public static String qualifyURLIfNeeded(String url,
                                        HttpServletRequest req)
We always want expresso.continueURL objects to be fully qualified. If we detect that the URL is not fully qualified, we attempt to make it fully qualified.

Creation date: (9/16/00 3:22:30 PM) author: Adam Rossi, PlatinumSolutions

Parameters:
url - java.lang.String
req -
Returns:
java.lang.String

setBackURL

public static void setBackURL(String newURL,
                              HttpServletRequest request)
                       throws ServletException
The "back" URL is used at the bottom of servlets to offer the user a quick way to go "back" to the page they started from e.g. before they requested the current servlet. This method allows us to set a specific "back" URL

Parameters:
newURL -
request -
Throws:
ServletException

setBackURL

public static void setBackURL(HttpServletRequest request)
                       throws ServletException
The "back" URL is used at the bottom of servlets to offer the user a quick way to go "back" to the page they started from e.g. before they requested the current servlet. This method sets the "back" URL to be the value of the "back" parameter given to the current servlet

Parameters:
request -
Throws:
ServletException

getBackURL

public static String getBackURL(HttpServletRequest request)
                         throws ServletException
Return the "back" URL, usually displayed at the bottom of the servlet page to provide the user a way to go back to the page they called the servlet from

Parameters:
request -
Returns:
Throws:
ServletException

setContinueURL

public static void setContinueURL(String newURL,
                                  HttpServletRequest request)
                           throws ServletException
Parameters:
newURL -
request -
Throws:
ServletException

setContinueURL

public static void setContinueURL(String newURL,
                                  HttpServletRequest request,
                                  HttpServletResponse response)
                           throws ServletException
Override the normal "next" parameter to go somewhere else

Parameters:
newURL -
request -
response -
Throws:
ServletException

setContinueURL

public static void setContinueURL(HttpServletRequest req)
                           throws ServletException
We use this method to set the current location as the continueURL. Useful in JSP pages when we want to set the continueURL if we get an error.

Creation date: (9/14/00 11:10:11 PM) author: Adam Rossi, PlatinumSolutions

Parameters:
req - javax.servlet.http.HttpServletRequest
Throws:
ServletException

setContinueURL

public static void setContinueURL(HttpServletRequest req,
                                  HttpServletResponse res)
                           throws ServletException
We use this method to set the current location as the continueURL. Useful in JSP pages when we want to set the continueURL if we get an error.

Creation date: (9/14/00 11:10:11 PM) author: Adam Rossi, PlatinumSolutions

Parameters:
res -
req - javax.servlet.http.HttpServletRequest
Throws:
ServletException

setContinueURLFromQueryString

public static void setContinueURLFromQueryString(HttpServletRequest req)
                                          throws ServletException
set the continue URL from a query string "next" parameter Creation date: (12/17/00 2:24:49 PM)

Parameters:
req - javax.servlet.http.HttpServletRequest
Throws:
ServletException - The exception description.

Expresso 5-6

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