|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.request.Request
org.apache.wicket.request.http.WebRequest
org.apache.wicket.protocol.http.servlet.ServletWebRequest
public class ServletWebRequest
WebRequest
subclass that wraps a HttpServletRequest
object.
Field Summary |
---|
Fields inherited from class org.apache.wicket.request.http.WebRequest |
---|
HEADER_AJAX, HEADER_AJAX_BASE_URL, PARAM_AJAX, PARAM_AJAX_BASE_URL |
Constructor Summary | |
---|---|
ServletWebRequest(javax.servlet.http.HttpServletRequest httpServletRequest,
String filterPrefix)
Construct. |
|
ServletWebRequest(javax.servlet.http.HttpServletRequest httpServletRequest,
String filterPrefix,
Url url)
Construct. |
Method Summary | |
---|---|
ServletWebRequest |
cloneWithUrl(Url url)
Returns request with specified URL and same POST parameters as this request. |
protected Map<String,List<StringValue>> |
generatePostParameters()
|
Charset |
getCharset()
|
Url |
getClientUrl()
Returns base url without context or filter mapping. |
List<javax.servlet.http.Cookie> |
getCookies()
|
long |
getDateHeader(String name)
Returns the value of the specified request header as a long value that
represents a Date object. |
String |
getFilterPrefix()
Returns the prefix of Wicket filter (without the leading /) |
String |
getHeader(String name)
Returns the value of the specified request header as a String |
List<String> |
getHeaders(String name)
Returns all the values of the specified request header. |
javax.servlet.http.HttpServletRequest |
getHttpServletRequest()
Returns the wrapped HttpServletRequest instance. |
Locale |
getLocale()
Returns locale for this request. |
IRequestParameters |
getPostParameters()
|
String |
getPrefixToContextPath()
Returns prefix from Wicket Filter mapping to context path. |
Url |
getUrl()
Returns the URL for this request. |
MultipartServletWebRequest |
newMultipartWebRequest(Bytes maxSize)
Creates multipart web request from this request. |
MultipartServletWebRequest |
newMultipartWebRequest(Bytes maxSize,
FileItemFactory factory)
Creates multipart web request from this request. |
Methods inherited from class org.apache.wicket.request.http.WebRequest |
---|
getCookie, getIfModifiedSinceHeader, isAjax |
Methods inherited from class org.apache.wicket.request.Request |
---|
getOriginalUrl, getQueryParameters, getRequestParameters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServletWebRequest(javax.servlet.http.HttpServletRequest httpServletRequest, String filterPrefix)
httpServletRequest
- filterPrefix
- contentPath + filterPath, used to extract the actual Url
public ServletWebRequest(javax.servlet.http.HttpServletRequest httpServletRequest, String filterPrefix, Url url)
httpServletRequest
- filterPrefix
- contentPath + filterPath, used to extract the actual Url
url
- Method Detail |
---|
public Url getClientUrl()
http://localhost:8080/context/filter/mapping/wicket/bookmarkable/com.foo.Page?1&id=2the base url is wicket/bookmarkable/com.foo.Page
wicket / bookmarkab
getClientUrl
in class Request
Request.getClientUrl()
public String getFilterPrefix()
public final javax.servlet.http.HttpServletRequest getHttpServletRequest()
HttpServletRequest
instance.
HttpServletRequest
instance.public List<javax.servlet.http.Cookie> getCookies()
getCookies
in class WebRequest
public Locale getLocale()
Request
getLocale
in class Request
public long getDateHeader(String name)
WebRequest
long
value that
represents a Date
object. Use this method with headers that contain dates, such
as If-Modified-Since
.
getDateHeader
in class WebRequest
public String getHeader(String name)
WebRequest
String
getHeader
in class WebRequest
public List<String> getHeaders(String name)
WebRequest
getHeaders
in class WebRequest
protected Map<String,List<StringValue>> generatePostParameters()
public IRequestParameters getPostParameters()
getPostParameters
in class Request
public Url getUrl()
Request
getUrl
in class Request
public ServletWebRequest cloneWithUrl(Url url)
WebRequest
cloneWithUrl
in class WebRequest
url
- Url instance
public MultipartServletWebRequest newMultipartWebRequest(Bytes maxSize) throws FileUploadException
maxSize
-
FileUploadException
public MultipartServletWebRequest newMultipartWebRequest(Bytes maxSize, FileItemFactory factory) throws FileUploadException
maxSize
- factory
-
FileUploadException
public String getPrefixToContextPath()
Request
For example if Wicket filter is mapped to hello/* this method should return ../ regardless of actual URL (after Wicket filter)
getPrefixToContextPath
in class Request
public Charset getCharset()
getCharset
in class Request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |