|
HDIV API 2.0.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hdiv.util.RequestUtilsHDIV
public class RequestUtilsHDIV
General purpose utility methods related to processing a servlet request.
| Constructor Summary | |
|---|---|
RequestUtilsHDIV()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
addHDIVParameterIfNecessary(javax.servlet.http.HttpServletRequest request,
java.lang.String url)
Adds HDIV state as a parameter if url references our application. |
static java.lang.String |
addHDIVParameterIfNecessary(javax.servlet.http.HttpServletRequest request,
java.lang.String url,
boolean prependServletContext)
Adds HDIV state as a parameter if url references our application. |
static java.lang.String |
addHDIVState(org.hdiv.dataComposer.IDataComposer dataComposer,
java.lang.String encodedURL,
java.lang.String anchor)
Adds the HDIV parameter, depending on the strategu defined by the user, to validate the request encodedURL. |
static java.lang.String |
composeAction(java.lang.String url,
int questionIndex,
java.lang.String charEncoding,
org.hdiv.dataComposer.IDataComposer dataComposer)
It generates a new encoded values for the url parameters. |
static java.lang.String |
composeURL(javax.servlet.http.HttpServletRequest request,
java.lang.String finalLocation)
It creates a new state to store all the parameters and values of the request and it generates a new encoded values for the
request parameters and adds the HDIV parameter. |
static java.lang.String |
getContextRelativePath(javax.servlet.ServletRequest request,
java.lang.String relativePath)
|
static java.lang.String |
getServletPath(javax.servlet.http.HttpServletRequest request)
Retrieves the current request servlet path. |
static boolean |
hasActionOrServletExtension(java.lang.String path,
org.apache.struts2.dispatcher.mapper.ActionMapper actionMapper)
Checks if path has an action extension or a jsp page extension. |
static boolean |
isContextRelativePath(javax.servlet.ServletRequest request,
java.lang.String path)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RequestUtilsHDIV()
| Method Detail |
|---|
public static java.lang.String addHDIVParameterIfNecessary(javax.servlet.http.HttpServletRequest request,
java.lang.String url,
boolean prependServletContext)
url references our application.
request - HTTP requesturl - URLprependServletContext - true to prepend the location with the
servlet context path, false otherwise
url with the HDIV state added as a new parameter
public static java.lang.String addHDIVParameterIfNecessary(javax.servlet.http.HttpServletRequest request,
java.lang.String url)
url references our application.
request - HTTP requesturl - URL
url with the HDIV state added as a new parameter
public static java.lang.String composeURL(javax.servlet.http.HttpServletRequest request,
java.lang.String finalLocation)
request and it generates a new encoded values for the
request parameters and adds the HDIV parameter.
request - HTTP requestfinalLocation - the location to redirect to
public static java.lang.String composeAction(java.lang.String url,
int questionIndex,
java.lang.String charEncoding,
org.hdiv.dataComposer.IDataComposer dataComposer)
It generates a new encoded values for the url parameters.
The returned values guarantees the confidentiality in the encoded and memory strategies if confidentiality indicator defined by user is true.
url - request urlquestionIndex - index of the first question occurrence in url stringcharEncoding - character encoding
public static java.lang.String addHDIVState(org.hdiv.dataComposer.IDataComposer dataComposer,
java.lang.String encodedURL,
java.lang.String anchor)
encodedURL.
dataComposer - HDIV's data composerencodedURL - URL encodedanchor - anchor
url with the HDIV state added as a new parameterorg.hdiv.composer.IDataComposer
public static boolean hasActionOrServletExtension(java.lang.String path,
org.apache.struts2.dispatcher.mapper.ActionMapper actionMapper)
path has an action extension or a jsp page extension.
path - pathactionMapper - action mapper
path is an action or references a jsp page.
public static boolean isContextRelativePath(javax.servlet.ServletRequest request,
java.lang.String path)
public static java.lang.String getContextRelativePath(javax.servlet.ServletRequest request,
java.lang.String relativePath)
public static java.lang.String getServletPath(javax.servlet.http.HttpServletRequest request)
request - the request
|
HDIV 2.0.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||