|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.Request org.apache.wicket.protocol.http.WebRequest
public abstract class WebRequest
Subclass of Request for HTTP protocol requests which holds an underlying HttpServletRequest object. A variety of convenience methods are available that operate on the HttpServletRequest object. These methods do things such as providing access to parameters, cookies, URLs and path information.
Constructor Summary | |
---|---|
WebRequest()
|
Method Summary | |
---|---|
javax.servlet.http.Cookie |
getCookie(String name)
Get the requests' cookie by name |
javax.servlet.http.Cookie[] |
getCookies()
Get the requests' cookies |
abstract javax.servlet.http.HttpServletRequest |
getHttpServletRequest()
Gets the wrapped http servlet request object. |
abstract Locale |
getLocale()
Returns the preferred Locale that the client will accept content in, based on
the Accept-Language header. |
abstract String |
getParameter(String key)
Gets the request parameter with the given key. |
abstract Map<String,String[]> |
getParameterMap()
Gets the request parameters. |
abstract String[] |
getParameters(String key)
Gets the request parameters with the given key. |
abstract String |
getServletPath()
Gets the servlet path. |
abstract boolean |
isAjax()
Is the request an ajax request? |
abstract WebRequest |
newMultipartWebRequest(Bytes maxSize)
Create a runtime context type specific (e.g. |
Methods inherited from class org.apache.wicket.Request |
---|
decodeURL, getPage, getPath, getQueryString, getRelativePathPrefixToContextRoot, getRelativePathPrefixToWicketHandler, getRelativeURL, getRequestParameters, getURL, mergeVersion, setPage, setRequestParameters, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WebRequest()
Method Detail |
---|
public javax.servlet.http.Cookie[] getCookies()
public javax.servlet.http.Cookie getCookie(String name)
name
- The name of the cookie to be looked up
public abstract javax.servlet.http.HttpServletRequest getHttpServletRequest()
WARNING: it is usually a bad idea to depend on the http servlet request directly. Please use
the classes and methods that are exposed by Wicket (such as Session
instead. Send an email to the mailing list in case it is not clear how to do things or you
think you miss functionality which causes you to depend on this directly.
public abstract Locale getLocale()
Locale
that the client will accept content in, based on
the Accept-Language header. If the client request doesn't provide an Accept-Language header,
this method returns the default locale for the server.
getLocale
in class Request
Locale
for the clientpublic abstract String getParameter(String key)
getParameter
in class Request
key
- Parameter name
public abstract Map<String,String[]> getParameterMap()
getParameterMap
in class Request
public abstract String[] getParameters(String key)
getParameters
in class Request
key
- Parameter name
public abstract String getServletPath()
public abstract WebRequest newMultipartWebRequest(Bytes maxSize)
maxSize
- the maximum size this request may be
public abstract boolean isAjax()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |