|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.samskivert.servlet.util.RequestUtils
public class RequestUtils
A repository of utility functions related to HTTP servlet stuff.
| Constructor Summary | |
|---|---|
RequestUtils()
|
|
| Method Summary | |
|---|---|
static String |
getLocation(javax.servlet.http.HttpServletRequest req)
Reconstructs the current location (URL) from the request and servlet configuration (which is the only way to know which server we're on because that's not provided in the request) and returns it. |
static String |
getLocationEncoded(javax.servlet.http.HttpServletRequest req)
Reconstructs the current location (URL) from the request and servlet configuration (which is the only way to know which server we're on because that's not provided in the request) and returns it URL encoded so that it can be substituted into another URL. |
static String |
getServletURL(javax.servlet.http.HttpServletRequest req,
String path)
Prepends the server, port and servlet context path to the supplied path, resulting in a fully-formed URL for requesting a servlet. |
static String |
reconstructURL(javax.servlet.http.HttpServletRequest req)
Reconstructs the request URL including query parameters. |
static String |
rehostLocation(javax.servlet.http.HttpServletRequest req,
String servername)
Recreates the URL used to make the supplied request, replacing the server part of the URL with the supplied server name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RequestUtils()
| Method Detail |
|---|
public static String getLocationEncoded(javax.servlet.http.HttpServletRequest req)
public static String getLocation(javax.servlet.http.HttpServletRequest req)
public static String rehostLocation(javax.servlet.http.HttpServletRequest req,
String servername)
public static String getServletURL(javax.servlet.http.HttpServletRequest req,
String path)
public static String reconstructURL(javax.servlet.http.HttpServletRequest req)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||