|
||||||||||
| 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, PARAM_AJAX_REQUEST_ANTI_CACHE |
| 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. |
String |
getContextPath()
Returns the context path or an empty string if the application is running under root context. |
List<javax.servlet.http.Cookie> |
getCookies()
|
Time |
getDateHeader(String name)
Returns the value of the specified request header as a long value that
represents a Date object. |
String |
getFilterPath()
Returns the path to which wicket Filter is mapped or an empty string if the filter is mapped to /*. |
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,
String upload)
Creates multipart web request from this request. |
MultipartServletWebRequest |
newMultipartWebRequest(Bytes maxSize,
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,
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 Urlurl - | Method Detail |
|---|
public Url getClientUrl()
Example: if current url is
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 RequestRequest.getClientUrl()public String getFilterPrefix()
public List<javax.servlet.http.Cookie> getCookies()
getCookies in class WebRequestpublic Locale getLocale()
Request
getLocale in class Requestpublic Time getDateHeader(String name)
WebRequestlong value that
represents a Date object. Use this method with headers that contain dates, such
as If-Modified-Since.
getDateHeader in class WebRequestnull if not foundpublic String getHeader(String name)
WebRequestString
getHeader in class WebRequestpublic List<String> getHeaders(String name)
WebRequest
getHeaders in class WebRequestprotected Map<String,List<StringValue>> generatePostParameters()
public IRequestParameters getPostParameters()
getPostParameters in class Requestpublic Url getUrl()
Request
getUrl in class Requestpublic ServletWebRequest cloneWithUrl(Url url)
WebRequest
cloneWithUrl in class WebRequesturl - Url instance
public MultipartServletWebRequest newMultipartWebRequest(Bytes maxSize,
String upload)
throws FileUploadException
maxSize - upload - upload identifier for UploadInfo
FileUploadException
public MultipartServletWebRequest newMultipartWebRequest(Bytes maxSize,
String upload,
FileItemFactory factory)
throws FileUploadException
maxSize - upload - upload identifier for UploadInfofactory -
FileUploadExceptionpublic String getPrefixToContextPath()
RequestFor example if Wicket filter is mapped to hello/* this method should return ../ regardless of actual URL (after Wicket filter)
getPrefixToContextPath in class Requestpublic Charset getCharset()
Request
getCharset in class Requestpublic javax.servlet.http.HttpServletRequest getContainerRequest()
RequestRequest delegate to. This allows users to access features provided by the container
requests but not by generalized Wicket Request objects.
getContainerRequest in class Requestnull if nonepublic String getContextPath()
Request
getContextPath in class Requestpublic 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 Requestpublic boolean shouldPreserveClientUrl()
WebRequestfalse
.
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 WebRequesttrue if current client url should be preserved
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||