public class ServletParameters extends Parameters
Structure to store HTTP request parameters (from mono and multi-part form)
Parameters.DocParam
Constructor and Description |
---|
ServletParameters(javax.servlet.http.HttpServletRequest request)
Load request
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getBody()
Get body as byte array (not applicable if multipart)
|
java.lang.String |
getCharset()
Get charset
|
java.lang.String |
getContentType()
Get content type
|
java.lang.String |
getContextURL()
Get context URL
|
org.json.JSONArray |
getJSONArray()
Get body as JSONArray if applicable, null otherwise
|
org.json.JSONObject |
getJSONObject()
Get body as JSONObject if applicable, null otherwise
|
java.lang.String |
getLocationURL()
Get full URL location including GET parameters
|
java.lang.String |
getLogin()
Deprecated.
Use getLoginFromRequest
|
java.lang.String |
getLoginFromRequest()
Get login from request
|
java.lang.String |
getMethod()
Get method
|
javax.servlet.http.HttpServletRequest |
getRequest()
Original request
|
java.lang.String |
getServerURL()
Get server URL
|
javax.servlet.http.HttpSession |
getSession()
Get session
|
java.lang.String |
getSessionId()
Get session ID
|
boolean |
isDELETE()
Is DELETE method
|
boolean |
isGET()
Is GET method
|
boolean |
isPOST()
Is POST method
|
boolean |
isPUT()
Is PUT method
|
void |
loadParameters()
Load the request parameters
|
void |
setBody(byte[] body)
Set body as byte array
|
void |
setCharset(java.lang.String charset)
Set charset
|
void |
setContentType(java.lang.String contentType)
Set content type
|
void |
setContextURL(java.lang.String url)
Set context URL
|
void |
setJSONArray(org.json.JSONArray jsonArray)
Set body JSONArray
|
void |
setJSONObject(org.json.JSONObject jsonObject)
Set body JSONObject
|
void |
setLocationURL(java.lang.String locationURL)
Set full URL location including GET parameters
|
void |
setMethod(java.lang.String method)
Set method
|
void |
setServerURL(java.lang.String url)
Set server URL
|
void |
setSession(javax.servlet.http.HttpSession session)
Set session
|
java.lang.String |
toString() |
getBackLocation, getBaseLocation, getBooleanParameter, getBooleanParameter, getDocParameters, getDocument, getDoubleParameter, getDoubleParameter, getElapsedTime, getFloatParameter, getFloatParameter, getIntParameter, getIntParameter, getLocation, getLocation, getLocation, getLocation, getLongParameter, getLongParameter, getMultiParameters, getParameter, getParameter, getParameters, getParameters, getPrefixParameterNames, getPrefixParameters, getQueryString, getRoot, getUserAgent, has, hasDocParam, hasMultiParam, hasParam, remove, setBackLocation, setLocation, setParameter, setParameters, setRoot, setTime, setUserAgent, toJSON, toJSON
public ServletParameters(javax.servlet.http.HttpServletRequest request) throws java.lang.Exception
java.lang.Exception
public javax.servlet.http.HttpServletRequest getRequest()
public java.lang.String getServerURL()
public void setServerURL(java.lang.String url)
public java.lang.String getContextURL()
public void setContextURL(java.lang.String url)
public java.lang.String getLocationURL()
public void setLocationURL(java.lang.String locationURL)
public java.lang.String getMethod()
public void setMethod(java.lang.String method)
public boolean isGET()
public boolean isPOST()
public boolean isPUT()
public boolean isDELETE()
public java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
public java.lang.String getCharset()
public void setCharset(java.lang.String charset)
public byte[] getBody()
public void setBody(byte[] body)
public org.json.JSONObject getJSONObject()
public void setJSONObject(org.json.JSONObject jsonObject)
public org.json.JSONArray getJSONArray()
public void setJSONArray(org.json.JSONArray jsonArray)
@Deprecated public java.lang.String getLogin()
public java.lang.String getLoginFromRequest()
public javax.servlet.http.HttpSession getSession()
public void setSession(javax.servlet.http.HttpSession session)
session
- Sessionpublic java.lang.String getSessionId()
public void loadParameters() throws java.lang.Exception
java.lang.Exception
public java.lang.String toString()
toString
in class Parameters
Copyright (c)2006-2014 Simplicite Software. All Rights Reserved.