|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.epicentric.common.website.RedirectUtils
Utility class for handling HTTP and Servlet redirect and forward actions
| Constructor Summary | |
RedirectUtils()
Deprecated. |
|
| Method Summary | |
static void |
forward(javax.servlet.jsp.PageContext pageContext,
String path)
Deprecated. This method is similar to WebsiteUtils.sendRedirect, but results in a server-side redirect rather than a client-side, HTTP-header-based one. |
static String |
getAlternativeHost(javax.servlet.http.HttpServletRequest request)
Deprecated. Looks up the alternative host for a particular request based on the XML mapping file. |
static String |
getAlternativeHost(String oldHost)
Deprecated. Looks up the alternative host for a particular host (domain) based on the XML mapping file. |
static int |
getAlternativePort(javax.servlet.http.HttpServletRequest request)
Deprecated. Looks up the alternative port for a particular request based on the XML mapping file. |
static int |
getAlternativePort(String oldHost,
int oldPort)
Deprecated. Looks up the alternative port for a particular host (domain) based on the XML mapping file. |
static String |
getAlternativeProtocol(javax.servlet.http.HttpServletRequest request)
Deprecated. Looks up the alternative protocol for a particular request based on the XML mapping file. |
static String |
getAlternativeProtocol(String oldHost,
String oldProtocol)
Deprecated. Looks up the alternative protocol for a particular host (domain) based on the XML mapping file. |
static String |
getHostName(javax.servlet.http.HttpServletRequest request)
Deprecated. Wrapper method for HttpServletRequest.getHeader("Host") which converts possible "host:port" formatted hostnames into simple "host" formatted hostnames. |
static String |
getServerBase(javax.servlet.http.HttpServletRequest request)
Deprecated. Looks up the alternative server base (just the protocol, port number, and server name, no portal Http root) for a particular request based on the XML mapping file. |
static String |
getServerBaseURL(javax.servlet.http.HttpServletRequest request)
Deprecated. Looks up the alternative server base URL for a particular request based on the XML mapping file. |
static void |
printRedirect(Writer out,
String url)
Deprecated. Writes a meta-refresh tag to the given writer. |
static void |
sendRedirect(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
String path)
Deprecated. Provides Websphere (and official JSDK 2.1 spec) support for redirects. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RedirectUtils()
| Method Detail |
public static void forward(javax.servlet.jsp.PageContext pageContext,
String path)
throws IOException
req - The request object for the pageres - The response object for the pagepath - The RELATIVE path to the next requested URL
(may include query parameters)
public static void sendRedirect(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
String path)
throws IOException
req - The request object for the pageres - The response object for the pagepath - The absolute or relative path to the next requested URL (may include query parameters)RedirectUtils.printRedirect(Writer out, String url)public static String getHostName(javax.servlet.http.HttpServletRequest request)
req - The request object for the page
public static String getAlternativeProtocol(String oldHost,
String oldProtocol)
oldHost - the host from the request that this protocol is foroldProtocol - the current protocol, used as the default resultpublic static String getAlternativeProtocol(javax.servlet.http.HttpServletRequest request)
request - the request that requires interpretation
public static int getAlternativePort(String oldHost,
int oldPort)
oldHost - the host from the request that this port is foroldPort - the current port, used as the default resultpublic static int getAlternativePort(javax.servlet.http.HttpServletRequest request)
request - the request that requires interpretationpublic static String getAlternativeHost(String oldHost)
oldHost - the host from the request that the replacement is forpublic static String getAlternativeHost(javax.servlet.http.HttpServletRequest request)
request - the request that requires interpretationpublic static String getServerBaseURL(javax.servlet.http.HttpServletRequest request)
request - the request that requires interpretationpublic static String getServerBase(javax.servlet.http.HttpServletRequest request)
request - the request that requires interpretation
public static void printRedirect(Writer out,
String url)
out - The JspWriter out object that's implicitly defined in the pageurl - The url to redirect to - this may be absolute or relative
|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||