|
||||||||||
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
public abstract class WebRequest
Base class for request that provides additional web-related information.
Field Summary | |
---|---|
static String |
HEADER_AJAX
marker for Ajax requests |
static String |
HEADER_AJAX_BASE_URL
marker for Ajax-relative url |
static String |
PARAM_AJAX
marker for Ajax requests |
static String |
PARAM_AJAX_BASE_URL
marker for Ajax-relative url |
static String |
PARAM_AJAX_REQUEST_ANTI_CACHE
anti-cache query parameter added by Wicket.Ajax.Request at its URL |
Constructor Summary | |
---|---|
WebRequest()
|
Method Summary | |
---|---|
WebRequest |
cloneWithUrl(Url url)
Returns request with specified URL and same POST parameters as this request. |
javax.servlet.http.Cookie |
getCookie(String cookieName)
|
abstract List<javax.servlet.http.Cookie> |
getCookies()
|
abstract Time |
getDateHeader(String name)
Returns the value of the specified request header as a long value that
represents a Date object. |
abstract String |
getHeader(String name)
Returns the value of the specified request header as a String |
abstract List<String> |
getHeaders(String name)
Returns all the values of the specified request header. |
Time |
getIfModifiedSinceHeader()
Convenience method for retrieving If-Modified-Since header. |
boolean |
isAjax()
Returns whether this request is an Ajax 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.Request |
---|
getCharset, getClientUrl, getContainerRequest, getContextPath, getFilterPath, getLocale, getOriginalUrl, getPostParameters, getPrefixToContextPath, getQueryParameters, getRequestParameters, getUrl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PARAM_AJAX
public static final String HEADER_AJAX
public static final String PARAM_AJAX_BASE_URL
public static final String HEADER_AJAX_BASE_URL
public static final String PARAM_AJAX_REQUEST_ANTI_CACHE
Constructor Detail |
---|
public WebRequest()
Method Detail |
---|
public abstract List<javax.servlet.http.Cookie> getCookies()
public javax.servlet.http.Cookie getCookie(String cookieName)
cookieName
-
null
if the cookie does not existpublic abstract List<String> getHeaders(String name)
name
-
public abstract String getHeader(String name)
String
name
-
public abstract Time getDateHeader(String name)
long
value that
represents a Date
object. Use this method with headers that contain dates, such
as If-Modified-Since
.
name
-
null
if not foundpublic final Time getIfModifiedSinceHeader()
null
if not setpublic boolean isAjax()
true
if this request is an ajax request, false
otherwise.public boolean shouldPreserveClientUrl()
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.
true
if current client url should be preservedpublic WebRequest cloneWithUrl(Url url)
cloneWithUrl
in class Request
url
- Url instance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |