|
||||||||||
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()
Gets charset of the request |
Url |
getClientUrl()
Returns base url without context or filter mapping. |
javax.servlet.http.HttpServletRequest |
getContainerRequest()
Provides access to the low-level container request object that implementaion of this Request delegate to. |
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. |
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 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()
Request
getCharset
in class Request
public javax.servlet.http.HttpServletRequest getContainerRequest()
Request
Request
delegate to. This allows users to access features provided by the container
requests but not by generalized Wicket Request
objects.
getContainerRequest
in class Request
null
if none
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |