|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.ucsb.nceas.metacat.util.RequestUtil
public class RequestUtil
| Method Summary | |
|---|---|
static void |
clearRequestMessages(javax.servlet.http.HttpServletRequest request)
Add a list of general messages to the request. |
static void |
forwardRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.util.Hashtable<java.lang.String,java.lang.String[]> params)
Forward a request that was received by this servlet on to another JSP page or servlet to continue handling the request. |
static void |
forwardRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String destinationUrl,
java.util.Hashtable<java.lang.String,java.lang.String[]> params)
Forward a request that was received by this servlet on to another JSP page or servlet to continue handling the request. |
static java.lang.String |
get(java.lang.String urlString,
java.util.Hashtable<java.lang.String,java.lang.String[]> params)
|
static javax.servlet.http.Cookie |
getCookie(javax.servlet.http.HttpServletRequest request,
java.lang.String cookieName)
Get a cookie from a request by the cookie name |
static java.util.Hashtable<java.lang.String,java.lang.String[]> |
getParameters(javax.servlet.http.HttpServletRequest request)
Get a cookie from a request by the cookie name |
static SessionData |
getSessionData(javax.servlet.http.HttpServletRequest request)
Get the session data from a request. |
static java.lang.String |
post(org.apache.commons.httpclient.HttpClient httpClient,
java.lang.String url,
java.util.HashMap<java.lang.String,java.lang.String> paramMap)
Post a request and return the response body |
static void |
setRequestErrors(javax.servlet.http.HttpServletRequest request,
java.util.Vector<java.lang.String> errorVector)
Add a list of errors to the request. |
static void |
setRequestFormErrors(javax.servlet.http.HttpServletRequest request,
java.util.Vector<java.lang.String> errorVector)
Add a list of form errors to the request. |
static void |
setRequestMessage(javax.servlet.http.HttpServletRequest request,
java.util.Vector<java.lang.String> messageVector)
Add a list of general messages to the request. |
static void |
setRequestSuccess(javax.servlet.http.HttpServletRequest request,
java.util.Vector<java.lang.String> successVector)
Add a list of success messages to the request. |
static void |
setUserId(javax.servlet.http.HttpServletRequest request,
java.lang.String userId)
Add the user's login id to the session on this request |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void forwardRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String destinationUrl,
java.util.Hashtable<java.lang.String,java.lang.String[]> params)
throws MetacatUtilException
request - to be forwardedresponse - that can be used for writing output to the clientdestination - the context-relative URL to which the request is forwardedparams - the request parameters. these will be added to the request
MetacatUtilException
public static void forwardRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.util.Hashtable<java.lang.String,java.lang.String[]> params)
throws MetacatUtilException
request - to be forwardedresponse - that can be used for writing output to the clientparams - the request parameters. these will be added to the request.
MetacatUtilException
public static java.lang.String post(org.apache.commons.httpclient.HttpClient httpClient,
java.lang.String url,
java.util.HashMap<java.lang.String,java.lang.String> paramMap)
throws java.io.IOException,
org.apache.commons.httpclient.HttpException
httpClient - The HttpClient to use in the post. This is passed in because
the same client may be used in several postsurl - the url to post toparamMap - map of parameters to add to the post
java.io.IOException
org.apache.commons.httpclient.HttpException
public static java.lang.String get(java.lang.String urlString,
java.util.Hashtable<java.lang.String,java.lang.String[]> params)
throws MetacatUtilException
MetacatUtilException
public static javax.servlet.http.Cookie getCookie(javax.servlet.http.HttpServletRequest request,
java.lang.String cookieName)
request - the request from which to get the cookiecookieName - the name of the cookie to look forpublic static SessionData getSessionData(javax.servlet.http.HttpServletRequest request)
request - the request from which to get the session data
public static java.util.Hashtable<java.lang.String,java.lang.String[]> getParameters(javax.servlet.http.HttpServletRequest request)
request - the request from which to get the cookiecookieName - the name of the cookie to look for
public static void setRequestErrors(javax.servlet.http.HttpServletRequest request,
java.util.Vector<java.lang.String> errorVector)
request - the request that will get forwardederrorVector - a list of error strings
public static void setRequestFormErrors(javax.servlet.http.HttpServletRequest request,
java.util.Vector<java.lang.String> errorVector)
request - the request that will get forwardederrorVector - a list of form error strings
public static void setRequestSuccess(javax.servlet.http.HttpServletRequest request,
java.util.Vector<java.lang.String> successVector)
request - the request that will get forwardederrorVector - a list of success message strings
public static void setRequestMessage(javax.servlet.http.HttpServletRequest request,
java.util.Vector<java.lang.String> messageVector)
request - the request that will get forwardederrorVector - a list of general message stringspublic static void clearRequestMessages(javax.servlet.http.HttpServletRequest request)
request - the request that will get forwardederrorVector - a list of general message strings
public static void setUserId(javax.servlet.http.HttpServletRequest request,
java.lang.String userId)
request - the request that will get forwardeduserId - the user's login id
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||