|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MutableServletRequest
A servlet request that can be modified. It is very useful, for instance, when you need to change the values of some request parameters, inside a filter.
| Method Summary | |
|---|---|
String |
getReferer()
|
javax.servlet.ServletRequest |
getRequest()
|
Object |
getSessionAttribute(String attrName)
|
String |
removeParameter(String name)
Removes the request parameter with the specified name. |
void |
sendRedirect(javax.servlet.ServletResponse response,
String url)
Redirects this request to the specified URL. |
String |
setParameter(String name,
String value)
Sets the value of a request parameter. |
String[] |
setParameterValues(String name,
String[] values)
Sets the values of a request parameter. |
Object |
setSessionAttribute(String attrName,
Object attrValue)
Sets the value of a session attribute. |
| Methods inherited from interface javax.servlet.ServletRequest |
|---|
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding |
| Method Detail |
|---|
String setParameter(String name,
String value)
name - the name of the request parametervalue - the new value of the request parameter
null if this is the first time we set its
value
String[] setParameterValues(String name,
String[] values)
name - the name of the request parametervalues - the new array of values for the specified request parameter
null if this is the first time we set its
valuesString removeParameter(String name)
name - a string representing the name of the request parameter to be removed
null if it wasn't set
void sendRedirect(javax.servlet.ServletResponse response,
String url)
throws IOException
ServletRequest.
response - the response object used to redirecturl - the location where to redirect
IOException - if the redirect failsString getReferer()
Object getSessionAttribute(String attrName)
attrName - the name of the session attribute whose value should be retrieved
Object setSessionAttribute(String attrName,
Object attrValue)
attrName - the name of the session attributeattrValue - the value to be set
javax.servlet.ServletRequest getRequest()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||