|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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,
java.lang.String filterPrefix)
Construct. |
|
ServletWebRequest(javax.servlet.http.HttpServletRequest httpServletRequest,
java.lang.String filterPrefix,
Url url)
Construct. |
Method Summary | |
---|---|
ServletWebRequest |
cloneWithUrl(Url url)
Returns request with specified URL and same POST parameters as this request. |
protected java.util.Map<java.lang.String,java.util.List<StringValue>> |
generatePostParameters()
|
java.nio.charset.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. |
java.lang.String |
getContextPath()
Returns the context path or an empty string if the application is running under root context. |
java.util.List<javax.servlet.http.Cookie> |
getCookies()
|
Time |
getDateHeader(java.lang.String name)
Returns the value of the specified request header as a long value that
represents a Date object. |
java.lang.String |
getFilterPath()
Returns the path to which wicket Filter is mapped or an empty string if the filter is mapped to /* . |
java.lang.String |
getFilterPrefix()
Returns the prefix of Wicket filter (without the leading /) |
java.lang.String |
getHeader(java.lang.String name)
Returns the value of the specified request header as a String |
java.util.List<java.lang.String> |
getHeaders(java.lang.String name)
Returns all the values of the specified request header. |
java.util.Locale |
getLocale()
Returns locale for this request. |
IRequestParameters |
getPostParameters()
|
java.lang.String |
getPrefixToContextPath()
Returns prefix from Wicket Filter mapping to context path. |
Url |
getUrl()
Returns the URL for this request. |
MultipartServletWebRequest |
newMultipartWebRequest(Bytes maxSize,
java.lang.String upload)
Creates multipart web request from this request. |
MultipartServletWebRequest |
newMultipartWebRequest(Bytes maxSize,
java.lang.String upload,
FileItemFactory factory)
Creates multipart web request from this request. |
boolean |
shouldPreserveClientUrl()
Signals whether or not request processing should preserve the current client url - in other words, handle this request without redirecting. |
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, java.lang.String filterPrefix)
httpServletRequest
- filterPrefix
- contentPath + filterPath, used to extract the actual Url
public ServletWebRequest(javax.servlet.http.HttpServletRequest httpServletRequest, java.lang.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
getClientUrl
in class Request
Request.getClientUrl()
public java.lang.String getFilterPrefix()
public java.util.List<javax.servlet.http.Cookie> getCookies()
getCookies
in class WebRequest
public java.util.Locale getLocale()
Request
getLocale
in class Request
public Time getDateHeader(java.lang.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
null
if not foundpublic java.lang.String getHeader(java.lang.String name)
WebRequest
String
getHeader
in class WebRequest
public java.util.List<java.lang.String> getHeaders(java.lang.String name)
WebRequest
getHeaders
in class WebRequest
protected java.util.Map<java.lang.String,java.util.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, java.lang.String upload) throws FileUploadException
maxSize
- upload
- upload identifier for UploadInfo
FileUploadException
public MultipartServletWebRequest newMultipartWebRequest(Bytes maxSize, java.lang.String upload, FileItemFactory factory) throws FileUploadException
maxSize
- upload
- upload identifier for UploadInfo
factory
-
FileUploadException
public java.lang.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 java.nio.charset.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 nonepublic java.lang.String getContextPath()
Request
getContextPath
in class Request
public java.lang.String getFilterPath()
Request
/*
. Returned path, unless an empty string, will always start with a slash and will
never end with a slash.
getFilterPath
in class Request
public boolean shouldPreserveClientUrl()
WebRequest
false
.
For example, this method can be used to preserve the url that caused a 404 in the browser if
Wicket is also responsible for rendering the 404 page. If this method returns the default
value of false
then Wicket will redirect to the bookmarkable url of the error page,
instead of preserving the url that caused the 404 in the browser.
shouldPreserveClientUrl
in class WebRequest
true
if current client url should be preserved
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |