|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.p13n.appflow.webflow.WebflowJSPHelper
WebflowJSPHelper
provides utility methods needed by
JSP's when working with webflow and pipeline.
Field Summary | |
static int |
CALCULATE_ESCAPE_URL
Flag indicating that URL escaping should be calculated |
static int |
CALCULATE_HTTPS
An HTTPSFlag value to be used in createWebflowURL. |
static java.lang.String |
DEFAULT_HTTP_PORT
If the http port = DEFAULT_HTTP_PORT (80) it will not include it in the URL |
static java.lang.String |
DEFAULT_HTTPS_PORT
If the https port = DEFAULT_HTTPS_PORT (443) it will not include it in the URL |
static int |
ESCAPE_URL
Flag indicating that the URL should be escaped |
static java.lang.String |
FORCE_HTTPS_FOR_AUTH_USERS
The name of the initialization parameter that specifies if HTTPS use should be forced for all resources once the user has been authenticated. |
static int |
NO_ESCAPE_URL
Flag indicating that the URL should not be escaped |
static java.lang.String |
P13N_APPLICATION_URL_DEFAULT
The default servlet path information for webflow. |
static java.lang.String |
P13N_APPLICATION_URL_ELEMENT_NAME
The name of the initialization parameter that specifies a the servlet path for the webflow servlet in this webapp. |
static java.lang.String |
P13N_STATIC_ROOT_ELEMENT_NAME
The name of the initialization parameter that specifies the path to static resources for the webflow URLs. |
static java.lang.String |
P13N_URL_DOMAIN_NAME
The name of the context parameter that specifies a domain name for the URL in cases where Apache is fronting a webflow app. |
static java.lang.String |
P13N_URL_PREFIX_ELEMENT_NAME
The name of the context parameter that specifies a prefix for the URL in cases where Apache is fronting a webflow app. |
static java.lang.String |
PROXY_ALLOW_OVERRIDE_SSL
Parameter name for allowing over ride of the SSL setting on a managed node |
static int |
USE_HTTP
An HTTPSFlag value to be used in createWebflowURL. |
static int |
USE_HTTPS
An HTTPSFlag value to be used in createWebflowURL. |
static int |
USE_WEBAPP_DEFAULT_HTTPS
An HTTPSFlag value to be used in createWebflowURL. |
Constructor Summary | |
WebflowJSPHelper()
|
Method Summary | |
static java.lang.String |
createStaticResourceURL(javax.servlet.jsp.PageContext pageContext,
java.lang.String url)
Returns a URL for images and other static resources that may exist on a seperate server. |
static java.lang.String |
createStaticResourceURL(javax.servlet.jsp.PageContext pageContext,
java.lang.String url,
boolean encode)
Returns a URL for images and other static resources that may exist on a seperate server. |
static java.lang.String |
createStaticResourceURL(javax.servlet.jsp.PageContext pageContext,
java.lang.String url,
boolean encode,
int escape)
Returns a URL for images and other static resources that may exist on a seperate server. |
static java.lang.String |
createStaticResourceURLWithEscape(javax.servlet.jsp.PageContext pageContext,
java.lang.String url,
int escape)
Returns an escaped URL for images and other static resources that may exist on a seperate server. |
static java.lang.String |
createWebflowURL(javax.servlet.jsp.PageContext pageContext,
java.lang.String origin,
java.lang.String event,
boolean includeParameters)
Returns a URL for Webflow. |
static java.lang.String |
createWebflowURL(javax.servlet.jsp.PageContext pageContext,
java.lang.String namespace,
java.lang.String origin,
java.lang.String event,
boolean includeParameters)
Returns a URL for Webflow. |
static java.lang.String |
createWebflowURL(javax.servlet.jsp.PageContext pageContext,
java.lang.String namespace,
java.lang.String origin,
java.lang.String event,
java.lang.String urlSuffix,
java.lang.String extraParams,
boolean includeParameters,
boolean doRedirect)
Returns a URL for Webflow. |
static java.lang.String |
createWebflowURL(javax.servlet.jsp.PageContext pageContext,
java.lang.String namespace,
java.lang.String origin,
java.lang.String event,
java.lang.String urlSuffix,
java.lang.String extraParams,
boolean includeParameters,
boolean doRedirect,
boolean encode)
Returns a URL for Webflow. |
static java.lang.String |
createWebflowURL(javax.servlet.jsp.PageContext pageContext,
java.lang.String namespace,
java.lang.String origin,
java.lang.String event,
java.lang.String urlSuffix,
java.lang.String extraParams,
boolean includeParameters,
boolean doRedirect,
boolean encode,
int HTTPSFlag)
Returns a URL for Webflow. |
static java.lang.String |
createWebflowURL(javax.servlet.jsp.PageContext pageContext,
java.lang.String namespace,
java.lang.String origin,
java.lang.String event,
java.lang.String urlSuffix,
java.lang.String extraParams,
java.lang.String urlPrefix,
java.lang.String domainName,
boolean includeParameters,
boolean doRedirect,
boolean encode,
int HTTPSFlag,
java.lang.String resourceIdentifier)
Returns a URL for Webflow. |
static java.lang.String |
createWebflowURL(javax.servlet.jsp.PageContext pageContext,
java.lang.String namespace,
java.lang.String origin,
java.lang.String event,
java.lang.String urlSuffix,
java.lang.String extraParams,
java.lang.String urlPrefix,
java.lang.String domainName,
boolean includeParameters,
boolean doRedirect,
boolean encode,
int HTTPSFlag,
java.lang.String resourceIdentifier,
int escape)
Returns a URL for Webflow. |
static java.lang.String |
createWebflowURL(javax.servlet.jsp.PageContext pageContext,
java.lang.String namespace,
java.lang.String origin,
java.lang.String event,
java.lang.String urlSuffix,
java.lang.String extraParams,
java.lang.String urlPrefix,
java.lang.String domainName,
boolean includeParameters,
boolean doRedirect,
int HTTPSFlag,
java.lang.String resourceIdentifier)
Returns a URL for Webflow. |
static java.lang.String |
createWebflowURL(javax.servlet.jsp.PageContext pageContext,
java.lang.String namespace,
java.lang.String origin,
java.lang.String event,
java.lang.String urlSuffix,
java.lang.String extraParams,
java.lang.String urlPrefix,
java.lang.String domainName,
boolean includeParameters,
boolean doRedirect,
int HTTPSFlag,
java.lang.String resourceIdentifier,
int escape)
Returns a URL for Webflow. |
static java.lang.String |
createWebflowURL(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String namespace,
java.lang.String origin,
java.lang.String event,
java.lang.String urlSuffix,
java.lang.String extraParams,
boolean includeParameters,
boolean doRedirect,
boolean encode,
int HTTPSFlag)
Returns a URL for Webflow. |
static java.lang.String |
createWebflowURL(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String namespace,
java.lang.String origin,
java.lang.String event,
java.lang.String urlSuffix,
java.lang.String extraParams,
java.lang.String urlPrefix,
java.lang.String domainName,
boolean includeParameters,
boolean doRedirect,
boolean encode,
int HTTPSFlag,
java.lang.String resourceIdentifier)
Returns a URL for Webflow. |
static java.lang.String |
createWebflowURL(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String namespace,
java.lang.String origin,
java.lang.String event,
java.lang.String urlSuffix,
java.lang.String extraParams,
java.lang.String urlPrefix,
java.lang.String domainName,
boolean includeParameters,
boolean doRedirect,
boolean encode,
int HTTPSFlag,
java.lang.String resourceIdentifier,
int escape)
Returns a URL for Webflow. |
static java.lang.String |
encodeURL(javax.servlet.http.HttpServletResponse response,
java.lang.String url)
Encodes a given URL string using response.encodeURL(). |
static java.lang.String |
escapeURL(java.lang.String url)
Escape a given URL string using java.net.URLEncoder.encode(). |
static java.lang.String |
escapeURL(java.lang.String url,
boolean calculate)
Escape a given URL string using java.net.URLEncoder.encode(). |
static java.lang.String |
getDefaultWebflowNamespace(javax.servlet.jsp.PageContext pageContext)
Gets the name of the default namespace. |
static boolean |
getEncodeDefault(javax.servlet.jsp.PageContext pageContext)
Returns the default setting for URL response encoding. |
static boolean |
getEncodeStaticDefault(javax.servlet.jsp.PageContext pageContext)
Returns the default setting for static URL response encoding. |
static int |
getEscapeDefault(javax.servlet.jsp.PageContext pageContext)
Returns the default setting for URL escaping. |
static int |
getEscapeStaticDefault(javax.servlet.jsp.PageContext pageContext)
Returns the default setting for static URL escaping. |
static int |
getHTTPSDefaultFlag()
Check to see what the web app default setting for HTTPS is. |
static java.lang.String |
getSslEnabled()
|
static boolean |
isForceHTTPS()
|
static java.lang.String |
priceFormat(double price)
Deprecated. |
static java.lang.String |
quantityFormat(double quantity)
Deprecated. |
static boolean |
shouldForceHTTPS(javax.servlet.http.HttpServletRequest request)
Determine if HTTPS should be forced for this particular request. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String P13N_URL_PREFIX_ELEMENT_NAME
public static final java.lang.String P13N_URL_DOMAIN_NAME
public static final java.lang.String P13N_APPLICATION_URL_ELEMENT_NAME
public static final java.lang.String P13N_APPLICATION_URL_DEFAULT
public static final java.lang.String P13N_STATIC_ROOT_ELEMENT_NAME
public static final java.lang.String PROXY_ALLOW_OVERRIDE_SSL
public static final java.lang.String FORCE_HTTPS_FOR_AUTH_USERS
public static final int CALCULATE_HTTPS
public static final int USE_HTTP
public static final int USE_HTTPS
public static final int USE_WEBAPP_DEFAULT_HTTPS
public static final java.lang.String DEFAULT_HTTP_PORT
public static final java.lang.String DEFAULT_HTTPS_PORT
public static final int NO_ESCAPE_URL
public static final int ESCAPE_URL
public static final int CALCULATE_ESCAPE_URL
Constructor Detail |
public WebflowJSPHelper()
Method Detail |
public static java.lang.String encodeURL(javax.servlet.http.HttpServletResponse response, java.lang.String url)
response
- HttpServletResponse object.public static java.lang.String escapeURL(java.lang.String url)
url
- String object.public static java.lang.String escapeURL(java.lang.String url, boolean calculate)
url
- a String, the URL to escapecalculate
- a boolean indicating if the URL should be checked before it
is encoded. If true the URL will be checked for "unsafe" charaters before it
is encoded. If false the URL will be encoded regardless of its content.public static int getHTTPSDefaultFlag()
public static java.lang.String createWebflowURL(javax.servlet.jsp.PageContext pageContext, java.lang.String origin, java.lang.String event, boolean includeParameters) throws javax.servlet.jsp.JspException
Note: this method assumes redirect = false, HTTPSFlag = USE_WEBAPP_DEFAULT_HTTPS, encode = ENCODE_URLS default web.xml setting and escape = ESCAPE_URLS default web.xml setting
pageContext
- The PageContext object from the JSP.origin
- a String containing the origin of the webflow event.
If this is null, the origin is assumed to be
"begin" by the webflow engine.event
- a String containing the webflow event to be used.
This parameter is required, unless origin =
"begin", in which case it is ignored and can be null.includeParameters
- a boolean, if true then the given namespace, origin
and event will be included as parameters in
the generated URL. A value of false is suitable
for requests with hidden namespace, origin
and event parameters. Usually this should be set
to true
for GETs and
false
for POSTs.encodeURL(HttpServletResponse response, String url)
,
escapeURL(String url)
,
escapeURL(String url, boolean calculate)
public static java.lang.String createWebflowURL(javax.servlet.jsp.PageContext pageContext, java.lang.String namespace, java.lang.String origin, java.lang.String event, boolean includeParameters) throws javax.servlet.jsp.JspException
Note: this method assumes redirect = false, HTTPSFlag = USE_WEBAPP_DEFAULT_HTTPS, encode = ENCODE_URLS default web.xml setting and escape = ESCAPE_URLS default web.xml setting
pageContext
- The PageContext object from the JSP.namespace
- a String containing the webflow namespace that the
origin belongs to. If this
is null, the webflow engine will assume the
namespace of the destination of the last webflow
execution for this HttpSession. If that does not
exist, the web app's default namespace is used.origin
- a String containing the origin of the webflow event.
If this is null, the origin is assumed to be
"begin" by the webflow engine.event
- a String containing the webflow event to be used.
This parameter is required, unless origin =
"begin", in which case it is ignored and can be null.includeParameters
- a boolean, if true then the given namespace, origin
and event will be included as parameters in
the generated URL. A value of false is suitable
for requests with hidden namespace, origin
and event parameters. Usually this should be set
to true
for GETs and
false
for POSTs.encodeURL(HttpServletResponse response, String url)
,
escapeURL(String url)
,
escapeURL(String url, boolean calculate)
public static java.lang.String createWebflowURL(javax.servlet.jsp.PageContext pageContext, java.lang.String namespace, java.lang.String origin, java.lang.String event, java.lang.String urlSuffix, java.lang.String extraParams, boolean includeParameters, boolean doRedirect) throws javax.servlet.jsp.JspException
Note: this method assumes HTTPSFlag = USE_WEBAPP_DEFAULT_HTTPS, encode = ENCODE_URLS default web.xml setting and escape = ESCAPE_URLS default web.xml setting
pageContext
- The PageContext object from the JSP.namespace
- a String containing the webflow namespace that the
origin belongs to. If this
is null, the webflow engine will assume the
namespace of the destination of the last webflow
execution for this HttpSession. If that does not
exist, the web app's default namespace is used.origin
- a String containing the origin of the webflow event.
If this is null, the origin is assumed to be
"begin" by the webflow engine.event
- a String containing the webflow event to be used.
This parameter is required, unless origin =
"begin", in which case it is ignored and can be null.urlSuffix
- a String, that can contain extra relative path info
that will be added to the URL after the servlet path
and before the parameters. Pass null
if you have no additional path information.extraParams
- a String, that can contain extra parameters to add to
the URL after the servlet path information. Do not
prepend a '&' or '?' to the String, the method will
do that for you. You should pass a String of
the form "param=value¶m2=value2...". Pass null
if you have no additional parameters.includeParameters
- a boolean, if true then the given namespace, origin
and event will be included as parameters in
the generated URL. A value of false is suitable
for requests with hidden namespace, origin
and event parameters. Usually this should be set
to true
for GETs and
false
for POSTs.doRedirect
- a boolean, if true add param to URL to signal
webflow to redirect and not forward to the URLencodeURL(HttpServletResponse response, String url)
,
escapeURL(String url)
,
escapeURL(String url, boolean calculate)
public static java.lang.String createWebflowURL(javax.servlet.jsp.PageContext pageContext, java.lang.String namespace, java.lang.String origin, java.lang.String event, java.lang.String urlSuffix, java.lang.String extraParams, boolean includeParameters, boolean doRedirect, boolean encode) throws javax.servlet.jsp.JspException
Note: this method assumes HTTPSFlag = USE_WEBAPP_DEFAULT_HTTPS and escape = ESCAPE_URLS default web.xml setting
pageContext
- The PageContext object from the JSP.namespace
- a String containing the webflow namespace that the
origin belongs to. If this
is null, the webflow engine will assume the
namespace of the destination of the last webflow
execution for this HttpSession. If that does not
exist, the web app's default namespace is used.origin
- a String containing the origin of the webflow event.
If this is null, the origin is assumed to be
"begin" by the webflow engine.event
- a String containing the webflow event to be used.
This parameter is required, unless origin =
"begin", in which case it is ignored and can be null.urlSuffix
- a String, that can contain extra relative path info
that will be added to the URL after the servlet path
and before the parameters. Pass null
if you have no additional path information.extraParams
- a String, that can contain extra parameters to add to
the URL after the servlet path information. Do not
prepend a '&' or '?' to the String, the method will
do that for you. You should pass a String of
the form "param=value¶m2=value2...". Pass null
if you have no additional parameters.includeParameters
- a boolean, if true then the given namespace, origin
and event will be included as parameters in
the generated URL. A value of false is suitable
for requests with hidden namespace, origin
and event parameters. Usually this should be set
to true
for GETs and
false
for POSTs.doRedirect
- a boolean, if true add param to URL to signal
webflow to redirect and not forward to the URLencode
- a boolean, if true, this method will encode the resultant URL
before returning it, using HttpServletResponse.encode().
This will add the session identifier to the URL if
it is required for this client. This should usually
true.encodeURL(HttpServletResponse response, String url)
,
escapeURL(String url)
,
escapeURL(String url, boolean calculate)
public static java.lang.String createWebflowURL(javax.servlet.jsp.PageContext pageContext, java.lang.String namespace, java.lang.String origin, java.lang.String event, java.lang.String urlSuffix, java.lang.String extraParams, boolean includeParameters, boolean doRedirect, boolean encode, int HTTPSFlag) throws javax.servlet.jsp.JspException
Note: this method assumes escape = ESCAPE_URLS default web.xml setting
pageContext
- The PageContext object from the JSP.namespace
- a String containing the webflow namespace that the
origin belongs to. If this
is null, the webflow engine will assume the
namespace of the destination of the last webflow
execution for this HttpSession. If that does not
exist, the web app's default namespace is used.origin
- a String containing the origin of the webflow event.
If this is null, the origin is assumed to be
"begin" by the webflow engine.event
- a String containing the webflow event to be used.
This parameter is required, unless origin =
"begin", in which case it is ignored and can be null.urlSuffix
- a String, that can contain extra relative path info
that will be added to the URL after the servlet path
and before the parameters. Pass null
if you have no additional path information.extraParams
- a String, that can contain extra parameters to add to
the URL after the servlet path information. Do not
prepend a '&' or '?' to the String, the method will
do that for you. You should pass a String of
the form "param=value¶m2=value2...". Pass null
if you have no additional parameters.includeParameters
- a boolean, if true then the given namespace, origin
and event will be included as parameters in
the generated URL. A value of false is suitable
for requests with hidden namespace, origin
and event parameters. Usually this should be set
to true
for GETs and
false
for POSTs.doRedirect
- a boolean, if true add param to URL to signal
webflow to redirect and not forward to the URLencode
- a boolean, if true, this method will encode the resultant URL
before returning it, using HttpServletResponse.encode().
This will add the session identifier to the URL if
it is required for this client. This should usually
true.HTTPSFlag
- an int that can be USE_HTTP, USE_HTTPS,
CALCULATE_HTTPS, or USE_WEBAPP_DEFAULT_HTTPS.
USE_WEBAPP_DEFAULT_HTTPS is the default.
If you do not wish for WebflowJSPHelper to calculate
whether HTTPS is required for this URL,
you may specify whether
or not HTTPS should be used. Note that HTTP is
the normal choice, but if any dependent Inputprocessor
or PipelineComponent needs HTTPS and HTTP is specified
here, a configuration error will result. If you are
unsure of which to use or wish to uphold maintainability,
specify CALCULATE_HTTPS and rely on Webflow to
calculate this for you.encodeURL(HttpServletResponse response, String url)
,
escapeURL(String url)
,
escapeURL(String url, boolean calculate)
public static java.lang.String createWebflowURL(javax.servlet.jsp.PageContext pageContext, java.lang.String namespace, java.lang.String origin, java.lang.String event, java.lang.String urlSuffix, java.lang.String extraParams, java.lang.String urlPrefix, java.lang.String domainName, boolean includeParameters, boolean doRedirect, boolean encode, int HTTPSFlag, java.lang.String resourceIdentifier) throws javax.servlet.jsp.JspException
Note: this method assumes escape = ESCAPE_URLS default web.xml setting
pageContext
- The PageContext object from the JSP.namespace
- a String containing the webflow namespace that the
origin belongs to. If this
is null, the webflow engine will assume the
namespace of the destination of the last webflow
execution for this HttpSession. If that does not
exist, the web app's default namespace is used.origin
- a String containing the origin of the webflow event.
If this is null, the origin is assumed to be
"begin" by the webflow engine.event
- a String containing the webflow event to be used.
This parameter is required, unless origin =
"begin", in which case it is ignored and can be null.urlSuffix
- a String, that can contain extra relative path info
that will be added to the URL after the servlet path
and before the parameters. Pass null
if you have no additional path information.extraParams
- a String, that can contain extra parameters to add to
the URL after the servlet path information. Do not
prepend a '&' or '?' to the String, the method will
do that for you. You should pass a String of
the form "param=value¶m2=value2...". Pass null
if you have no additional parameters.urlPrefix
- An optional prefix that can be supplied to the servlet
path information, if non null this can overridie the
"P13N_URL_PREFIX" in the web.xml.domainName
- An optional parameter that can be used to specify a different domain
name. this is used when a proxy is located on another server. If non
null this will overrid the "P13N_URL_DOMAIN" in the web.xmlincludeParameters
- a boolean, if true then the given namespace, origin
and event will be included as parameters in
the generated URL. A value of false is suitable
for requests with hidden namespace, origin
and event parameters. Usually this should be set
to true
for GETs and
false
for POSTs.doRedirect
- a boolean, if true add param to URL to signal
webflow to redirect and not forward to the URLencode
- a boolean, if true, this method will encode the resultant URL
before returning it, using HttpServletResponse.encode().
This will add the session identifier to the URL if
it is required for this client. This should usually
true.HTTPSFlag
- an int that can be USE_HTTP, USE_HTTPS,
CALCULATE_HTTPS, or USE_WEBAPP_DEFAULT_HTTPS.
USE_WEBAPP_DEFAULT_HTTPS is the default.
If you do not wish for WebflowJSPHelper to calculate
whether HTTPS is required for this URL,
you may specify whether
or not HTTPS should be used. Note that HTTP is
the normal choice, but if any dependent Inputprocessor
or PipelineComponent needs HTTPS and HTTP is specified
here, a configuration error will result. If you are
unsure of which to use or wish to uphold maintainability,
specify CALCULATE_HTTPS and rely on Webflow to
calculate this for you.resourceIdentifier
- identify the resource this URL is being generated for.
for example the page name. This parameter is used to
determine if the resource requires the URLs to use https.
It may be null.encodeURL(HttpServletResponse response, String url)
,
escapeURL(String url)
,
escapeURL(String url, boolean calculate)
public static java.lang.String createWebflowURL(javax.servlet.jsp.PageContext pageContext, java.lang.String namespace, java.lang.String origin, java.lang.String event, java.lang.String urlSuffix, java.lang.String extraParams, java.lang.String urlPrefix, java.lang.String domainName, boolean includeParameters, boolean doRedirect, int HTTPSFlag, java.lang.String resourceIdentifier, int escape) throws javax.servlet.jsp.JspException
Note: this method assumes encode = ENCODE_URLS default web.xml setting
pageContext
- The PageContext object from the JSP.namespace
- a String containing the webflow namespace that the
origin belongs to. If this
is null, the webflow engine will assume the
namespace of the destination of the last webflow
execution for this HttpSession. If that does not
exist, the web app's default namespace is used.origin
- a String containing the origin of the webflow event.
If this is null, the origin is assumed to be
"begin" by the webflow engine.event
- a String containing the webflow event to be used.
This parameter is required, unless origin =
"begin", in which case it is ignored and can be null.urlSuffix
- a String, that can contain extra relative path info
that will be added to the URL after the servlet path
and before the parameters. Pass null
if you have no additional path information.extraParams
- a String, that can contain extra parameters to add to
the URL after the servlet path information. Do not
prepend a '&' or '?' to the String, the method will
do that for you. You should pass a String of
the form "param=value¶m2=value2...". Pass null
if you have no additional parameters.urlPrefix
- An optional prefix that can be supplied to the servlet
path information, if non null this can overridie the
"P13N_URL_PREFIX" in the web.xml.domainName
- An optional parameter that can be used to specify a different domain
name. this is used when a proxy is located on another server. If non
null this will overrid the "P13N_URL_DOMAIN" in the web.xmlincludeParameters
- a boolean, if true then the given namespace, origin
and event will be included as parameters in
the generated URL. A value of false is suitable
for requests with hidden namespace, origin
and event parameters. Usually this should be set
to true
for GETs and
false
for POSTs.doRedirect
- a boolean, if true add param to URL to signal
webflow to redirect and not forward to the URLHTTPSFlag
- an int that can be USE_HTTP, USE_HTTPS,
CALCULATE_HTTPS, or USE_WEBAPP_DEFAULT_HTTPS.
USE_WEBAPP_DEFAULT_HTTPS is the default.
If you do not wish for WebflowJSPHelper to calculate
whether HTTPS is required for this URL,
you may specify whether
or not HTTPS should be used. Note that HTTP is
the normal choice, but if any dependent Inputprocessor
or PipelineComponent needs HTTPS and HTTP is specified
here, a configuration error will result. If you are
unsure of which to use or wish to uphold maintainability,
specify CALCULATE_HTTPS and rely on Webflow to
calculate this for you.resourceIdentifier
- identify the resource this URL is being generated for.
for example the page name. This parameter is used to
determine if the resource requires the URLs to use https.
It may be null.escape
- an integer, should be one of WebflowJSPHelper.NO_ESCAPE_URL,
WebflowJSPHelper.ESCAPE_URL, or WebflowJSPHelper.CALCULATE_ESCAPE_URL.
If WebflowJSPHelper.NO_ESCAPE_URL, no escaping is performed. If
WebflowJSPHelper.ESCAPE_URL the URL will be escaped. If
WebflowJSPHelper.CALCULATE_ESCAPE_URL, the URL is checked for characters
that need to be escaped an encoding is performed only if needed.encodeURL(HttpServletResponse response, String url)
,
escapeURL(String url)
,
escapeURL(String url, boolean calculate)
public static java.lang.String createWebflowURL(javax.servlet.jsp.PageContext pageContext, java.lang.String namespace, java.lang.String origin, java.lang.String event, java.lang.String urlSuffix, java.lang.String extraParams, java.lang.String urlPrefix, java.lang.String domainName, boolean includeParameters, boolean doRedirect, int HTTPSFlag, java.lang.String resourceIdentifier) throws javax.servlet.jsp.JspException
Note: this method assumes encode = ENCODE_URLS default web.xml setting and escape = ESCAPE_URLS default web.xml setting
pageContext
- The PageContext object from the JSP.namespace
- a String containing the webflow namespace that the
origin belongs to. If this
is null, the webflow engine will assume the
namespace of the destination of the last webflow
execution for this HttpSession. If that does not
exist, the web app's default namespace is used.origin
- a String containing the origin of the webflow event.
If this is null, the origin is assumed to be
"begin" by the webflow engine.event
- a String containing the webflow event to be used.
This parameter is required, unless origin =
"begin", in which case it is ignored and can be null.urlSuffix
- a String, that can contain extra relative path info
that will be added to the URL after the servlet path
and before the parameters. Pass null
if you have no additional path information.extraParams
- a String, that can contain extra parameters to add to
the URL after the servlet path information. Do not
prepend a '&' or '?' to the String, the method will
do that for you. You should pass a String of
the form "param=value¶m2=value2...". Pass null
if you have no additional parameters.urlPrefix
- An optional prefix that can be supplied to the servlet
path information, if non null this can overridie the
"P13N_URL_PREFIX" in the web.xml.domainName
- An optional parameter that can be used to specify a different domain
name. this is used when a proxy is located on another server. If non
null this will overrid the "P13N_URL_DOMAIN" in the web.xmlincludeParameters
- a boolean, if true then the given namespace, origin
and event will be included as parameters in
the generated URL. A value of false is suitable
for requests with hidden namespace, origin
and event parameters. Usually this should be set
to true
for GETs and
false
for POSTs.doRedirect
- a boolean, if true add param to URL to signal
webflow to redirect and not forward to the URLHTTPSFlag
- an int that can be USE_HTTP, USE_HTTPS,
CALCULATE_HTTPS, or USE_WEBAPP_DEFAULT_HTTPS.
USE_WEBAPP_DEFAULT_HTTPS is the default.
If you do not wish for WebflowJSPHelper to calculate
whether HTTPS is required for this URL,
you may specify whether
or not HTTPS should be used. Note that HTTP is
the normal choice, but if any dependent Inputprocessor
or PipelineComponent needs HTTPS and HTTP is specified
here, a configuration error will result. If you are
unsure of which to use or wish to uphold maintainability,
specify CALCULATE_HTTPS and rely on Webflow to
calculate this for you.resourceIdentifier
- identify the resource this URL is being generated for.
for example the page name. This parameter is used to
determine if the resource requires the URLs to use https.
It may be null.encodeURL(HttpServletResponse response, String url)
,
escapeURL(String url)
,
escapeURL(String url, boolean calculate)
public static java.lang.String createWebflowURL(javax.servlet.jsp.PageContext pageContext, java.lang.String namespace, java.lang.String origin, java.lang.String event, java.lang.String urlSuffix, java.lang.String extraParams, java.lang.String urlPrefix, java.lang.String domainName, boolean includeParameters, boolean doRedirect, boolean encode, int HTTPSFlag, java.lang.String resourceIdentifier, int escape)
Note: this method assumes encode = default and escape = default web.xml setting
pageContext
- The PageContext object from the JSP.namespace
- a String containing the webflow namespace that the
origin belongs to. If this
is null, the webflow engine will assume the
namespace of the destination of the last webflow
execution for this HttpSession. If that does not
exist, the web app's default namespace is used.origin
- a String containing the origin of the webflow event.
If this is null, the origin is assumed to be
"begin" by the webflow engine.event
- a String containing the webflow event to be used.
This parameter is required, unless origin =
"begin", in which case it is ignored and can be null.urlSuffix
- a String, that can contain extra relative path info
that will be added to the URL after the servlet path
and before the parameters. Pass null
if you have no additional path information.extraParams
- a String, that can contain extra parameters to add to
the URL after the servlet path information. Do not
prepend a '&' or '?' to the String, the method will
do that for you. You should pass a String of
the form "param=value¶m2=value2...". Pass null
if you have no additional parameters.urlPrefix
- An optional prefix that can be supplied to the servlet
path information, if non null this can overridie the
"P13N_URL_PREFIX" in the web.xml.domainName
- An optional parameter that can be used to specify a different domain
name. this is used when a proxy is located on another server. If non
null this will overrid the "P13N_URL_DOMAIN" in the web.xmlincludeParameters
- a boolean, if true then the given namespace, origin
and event will be included as parameters in
the generated URL. A value of false is suitable
for requests with hidden namespace, origin
and event parameters. Usually this should be set
to true
for GETs and
false
for POSTs.doRedirect
- a boolean, if true add param to URL to signal
webflow to redirect and not forward to the URLencode
- a boolean, if true, this method will encode the resultant URL
before returning it, using HttpServletResponse.encode().
This will add the session identifier to the URL if
it is required for this client. This should usually
true.HTTPSFlag
- an int that can be USE_HTTP, USE_HTTPS,
CALCULATE_HTTPS, or USE_WEBAPP_DEFAULT_HTTPS.
USE_WEBAPP_DEFAULT_HTTPS is the default.
If you do not wish for WebflowJSPHelper to calculate
whether HTTPS is required for this URL,
you may specify whether
or not HTTPS should be used. Note that HTTP is
the normal choice, but if any dependent Inputprocessor
or PipelineComponent needs HTTPS and HTTP is specified
here, a configuration error will result. If you are
unsure of which to use or wish to uphold maintainability,
specify CALCULATE_HTTPS and rely on Webflow to
calculate this for you.resourceIdentifier
- identify the resource this URL is being generated for.
for example the page name. This parameter is used to
determine if the resource requires the URLs to use https.
It may be null.escape
- an integer, should be one of WebflowJSPHelper.NO_ESCAPE_URL,
WebflowJSPHelper.ESCAPE_URL, or WebflowJSPHelper.CALCULATE_ESCAPE_URL.
If WebflowJSPHelper.NO_ESCAPE_URL, no escaping is performed. If
WebflowJSPHelper.ESCAPE_URL the URL will be escaped. If
WebflowJSPHelper.CALCULATE_ESCAPE_URL, the URL is checked for characters
that need to be escaped an encoding is performed only if needed.encodeURL(HttpServletResponse response, String url)
,
escapeURL(String url)
,
escapeURL(String url, boolean calculate)
public static java.lang.String createWebflowURL(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String namespace, java.lang.String origin, java.lang.String event, java.lang.String urlSuffix, java.lang.String extraParams, boolean includeParameters, boolean doRedirect, boolean encode, int HTTPSFlag)
Note: this method assumes escape = ESCAPE_URLS default web.xml setting
context
- The ServletContext object from the container.request
- The HttpServletRequest objectresponse
- The HttpServletResponse objectnamespace
- a String containing the webflow namespace that the
origin belongs to. If this
is null, the webflow engine will assume the
namespace of the destination of the last webflow
execution for this HttpSession. If that does not
exist, the web app's default namespace is used.origin
- a String containing the origin of the webflow event.
If this is null, the origin is assumed to be
"begin" by the webflow engine.event
- a String containing the webflow event to be used.
This parameter is required, unless origin =
"begin", in which case it is ignored and can be null.urlSuffix
- a String, that can contain extra relative path info
that will be added to the URL after the servlet path
and before the parameters. Pass null. Also known as urlSuffix
if you have no additional path information.extraParams
- a String, that can contain extra parameters to add to
the URL after the servlet path information. Do not
prepend a '&' or '?' to the String, the method will
do that for you. You should pass a String of
the form "param=value¶m2=value2...". Pass null
if you have no additional parameters.includeParameters
- a boolean, if true then the given namespace, origin
and event will be included as parameters in
the generated URL. A value of false is suitable
for requests with hidden namespace, origin
and event parameters. Usually this should be set
to true
for GETs and
false
for POSTs.doRedirect
- a boolean, if true add param to URL to signal
webflow to redirect and not forward to the URLencode
- a boolean, if true, this method will encode the resultant URL
before returning it, using HttpServletResponse.encode().
This will add the session identifier to the URL if
it is required for this client. This should usually
true.HTTPSFlag
- an int that can be USE_HTTP, USE_HTTPS,
CALCULATE_HTTPS, or USE_WEBAPP_DEFAULT_HTTPS.
USE_WEBAPP_DEFAULT_HTTPS is the default.
If you do not wish for WebflowJSPHelper to calculate
whether HTTPS is required for this URL,
you may specify whether
or not HTTPS should be used. Note that HTTP is
the normal choice, but if any dependent Inputprocessor
or PipelineComponent needs HTTPS and HTTP is specified
here, a configuration error will result. If you are
unsure of which to use or wish to uphold maintainability,
specify CALCULATE_HTTPS and rely on Webflow to
calculate this for you.encodeURL(HttpServletResponse response, String url)
,
escapeURL(String url)
,
escapeURL(String url, boolean calculate)
public static boolean shouldForceHTTPS(javax.servlet.http.HttpServletRequest request)
request
- the current request, used to check if the user has been authenticatedpublic static boolean isForceHTTPS()
public static java.lang.String getSslEnabled()
public static java.lang.String createWebflowURL(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String namespace, java.lang.String origin, java.lang.String event, java.lang.String urlSuffix, java.lang.String extraParams, java.lang.String urlPrefix, java.lang.String domainName, boolean includeParameters, boolean doRedirect, boolean encode, int HTTPSFlag, java.lang.String resourceIdentifier)
Note: this method assumes escape = ESCAPE_URLS default web.xml setting
context
- The ServletContext object from the container.request
- The HttpServletRequest objectresponse
- The HttpServletResponse objectnamespace
- a String containing the webflow namespace that the
origin belongs to. If this
is null, the webflow engine will assume the
namespace of the destination of the last webflow
execution for this HttpSession. If that does not
exist, the web app's default namespace is used.origin
- a String containing the origin of the webflow event.
If this is null, the origin is assumed to be
"begin" by the webflow engine.event
- a String containing the webflow event to be used.
This parameter is required, unless origin =
"begin", in which case it is ignored and can be null.urlSuffix
- a String, that can contain extra relative path info
that will be added to the URL after the servlet path
and before the parameters. Pass null. Also known as urlSuffix
if you have no additional path information.extraParams
- a String, that can contain extra parameters to add to
the URL after the servlet path information. Do not
prepend a '&' or '?' to the String, the method will
do that for you. You should pass a String of
the form "param=value¶m2=value2...". Pass null
if you have no additional parameters.urlPrefix
- An optional prefix that can be supplied to the servlet
path information, if non null this can overridie the
"P13N_URL_PREFIX" in the web.xml.domainName
- An optional parameter that can be used to specify a different domain
name. this is used when a proxy is located on another server. If non
null this will overrid the "P13N_URL_DOMAIN" in the web.xmlincludeParameters
- a boolean, if true then the given namespace, origin
and event will be included as parameters in
the generated URL. A value of false is suitable
for requests with hidden namespace, origin
and event parameters. Usually this should be set
to true
for GETs and
false
for POSTs.doRedirect
- a boolean, if true add param to URL to signal
webflow to redirect and not forward to the URLencode
- a boolean, if true, this method will encode the resultant URL
before returning it, using HttpServletResponse.encode().
This will add the session identifier to the URL if
it is required for this client. This should usually
true.HTTPSFlag
- an int that can be USE_HTTP, USE_HTTPS,
CALCULATE_HTTPS, or USE_WEBAPP_DEFAULT_HTTPS.
USE_WEBAPP_DEFAULT_HTTPS is the default.
If you do not wish for WebflowJSPHelper to calculate
whether HTTPS is required for this URL,
you may specify whether
or not HTTPS should be used. Note that HTTP is
the normal choice, but if any dependent Inputprocessor
or PipelineComponent needs HTTPS and HTTP is specified
here, a configuration error will result. If you are
unsure of which to use or wish to uphold maintainability,
specify CALCULATE_HTTPS and rely on Webflow to
calculate this for you.resourceIdentifier
- identify the resource this URL is being generated for.
for example the page name. This parameter is used to
determine if the resource requires the URLs to use https.
It may be null.encodeURL(HttpServletResponse response, String url)
,
escapeURL(String url)
,
escapeURL(String url, boolean calculate)
public static java.lang.String createWebflowURL(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String namespace, java.lang.String origin, java.lang.String event, java.lang.String urlSuffix, java.lang.String extraParams, java.lang.String urlPrefix, java.lang.String domainName, boolean includeParameters, boolean doRedirect, boolean encode, int HTTPSFlag, java.lang.String resourceIdentifier, int escape)
context
- The ServletContext object from the container.request
- The HttpServletRequest objectresponse
- The HttpServletResponse objectnamespace
- a String containing the webflow namespace that the
origin belongs to. If this
is null, the webflow engine will assume the
namespace of the destination of the last webflow
execution for this HttpSession. If that does not
exist, the web app's default namespace is used.origin
- a String containing the origin of the webflow event.
If this is null, the origin is assumed to be
"begin" by the webflow engine.event
- a String containing the webflow event to be used.
This parameter is required, unless origin =
"begin", in which case it is ignored and can be null.urlSuffix
- a String, that can contain extra relative path info
that will be added to the URL after the servlet path
and before the parameters. Pass null. Also known as urlSuffix
if you have no additional path information.extraParams
- a String, that can contain extra parameters to add to
the URL after the servlet path information. Do not
prepend a '&' or '?' to the String, the method will
do that for you. You should pass a String of
the form "param=value¶m2=value2...". Pass null
if you have no additional parameters.urlPrefix
- An optional prefix that can be supplied to the servlet
path information, if non null this can overridie the
"P13N_URL_PREFIX" in the web.xml.domainName
- An optional parameter that can be used to specify a different domain
name. this is used when a proxy is located on another server. If non
null this will overrid the "P13N_URL_DOMAIN" in the web.xmlincludeParameters
- a boolean, if true then the given namespace, origin
and event will be included as parameters in
the generated URL. A value of false is suitable
for requests with hidden namespace, origin
and event parameters. Usually this should be set
to true
for GETs and
false
for POSTs.doRedirect
- a boolean, if true add param to URL to signal
webflow to redirect and not forward to the URLencode
- a boolean, if true, this method will encode the resultant URL
before returning it, using HttpServletResponse.encode().
This will add the session identifier to the URL if
it is required for this client. This should usually
true.HTTPSFlag
- an int that can be USE_HTTP, USE_HTTPS,
CALCULATE_HTTPS, or USE_WEBAPP_DEFAULT_HTTPS.
USE_WEBAPP_DEFAULT_HTTPS is the default.
If you do not wish for WebflowJSPHelper to calculate
whether HTTPS is required for this URL,
you may specify whether
or not HTTPS should be used. Note that HTTP is
the normal choice, but if any dependent Inputprocessor
or PipelineComponent needs HTTPS and HTTP is specified
here, a configuration error will result. If you are
unsure of which to use or wish to uphold maintainability,
specify CALCULATE_HTTPS and rely on Webflow to
calculate this for you.resourceIdentifier
- identify the resource this URL is being generated for.
for example the page name. This parameter is used to
determine if the resource requires the URLs to use https.
It may be null.escape
- an integer, should be one of WebflowJSPHelper.NO_ESCAPE_URL,
WebflowJSPHelper.ESCAPE_URL, or WebflowJSPHelper.CALCULATE_ESCAPE_URL.
If WebflowJSPHelper.NO_ESCAPE_URL, no escaping is performed. If
WebflowJSPHelper.ESCAPE_URL the URL will be escaped. If
WebflowJSPHelper.CALCULATE_ESCAPE_URL, the URL is checked for characters
that need to be escaped an encoding is performed only if needed.encodeURL(HttpServletResponse response, String url)
,
escapeURL(String url)
,
escapeURL(String url, boolean calculate)
public static java.lang.String createStaticResourceURL(javax.servlet.jsp.PageContext pageContext, java.lang.String url, boolean encode)
Note: this method replaces createGIFUrl() from the 3.1 to 3.5 releases
pageContext
- The PageContext object from the JSP.url
- a String containing a relative URL to the static resource.
This String generally should start with a '/' character.encode
- a boolean, if true, this method will encode the resultant URL
before returning it, using HttpServletResponse.encode().
This will add the session identifier to the URL if
it is required for this client. This should usually
true.encodeURL(HttpServletResponse response, String url)
,
escapeURL(String url)
,
escapeURL(String url, boolean calculate)
public static java.lang.String createStaticResourceURLWithEscape(javax.servlet.jsp.PageContext pageContext, java.lang.String url, int escape)
pageContext
- The PageContext object from the JSP.url
- a String containing a relative URL to the static resource.
This String generally should start with a '/' character.escape
- an integer, should be one of WebflowJSPHelper.NO_ESCAPE_URL,
WebflowJSPHelper.ESCAPE_URL, or WebflowJSPHelper.CALCULATE_ESCAPE_URL.
If WebflowJSPHelper.NO_ESCAPE_URL, no escaping is performed. If
WebflowJSPHelper.ESCAPE_URL the URL will be escaped. If
WebflowJSPHelper.CALCULATE_ESCAPE_URL, the URL is checked for characters
that need to be escaped an encoding is performed only if needed.encodeURL(HttpServletResponse response, String url)
,
escapeURL(String url)
,
escapeURL(String url, boolean calculate)
public static java.lang.String createStaticResourceURL(javax.servlet.jsp.PageContext pageContext, java.lang.String url)
pageContext
- The PageContext object from the JSP.url
- a String containing a relative URL to the static resource.
This String generally should start with a '/' character.encodeURL(HttpServletResponse response, String url)
,
escapeURL(String url)
,
escapeURL(String url, boolean calculate)
public static java.lang.String createStaticResourceURL(javax.servlet.jsp.PageContext pageContext, java.lang.String url, boolean encode, int escape)
pageContext
- The PageContext object from the JSP.url
- a String containing a relative URL to the static resource.
This String generally should start with a '/' character.encode
- a boolean, if true, this method will encode the resultant URL
before returning it, using HttpServletResponse.encode().
This will add the session identifier to the URL if
it is required for this client. This should usually
true.escape
- an integer, should be one of WebflowJSPHelper.NO_ESCAPE_URL,
WebflowJSPHelper.ESCAPE_URL, or WebflowJSPHelper.CALCULATE_ESCAPE_URL.
If WebflowJSPHelper.NO_ESCAPE_URL, no escaping is performed. If
WebflowJSPHelper.ESCAPE_URL the URL will be escaped. If
WebflowJSPHelper.CALCULATE_ESCAPE_URL, the URL is checked for characters
that need to be escaped an encoding is performed only if needed.encodeURL(HttpServletResponse response, String url)
,
escapeURL(String url)
,
escapeURL(String url, boolean calculate)
public static java.lang.String getDefaultWebflowNamespace(javax.servlet.jsp.PageContext pageContext)
pageContext
- The PageContext object from the JSP.public static boolean getEncodeDefault(javax.servlet.jsp.PageContext pageContext)
pageContext
- The PageContext object from the JSP.encodeURL(HttpServletResponse response, String url)
public static boolean getEncodeStaticDefault(javax.servlet.jsp.PageContext pageContext)
pageContext
- The PageContext object from the JSP.encodeURL(HttpServletResponse response, String url)
,
createStaticResourceURL(javax.servlet.jsp.PageContext, java.lang.String, boolean)
,
createStaticResourceURLWithEscape(javax.servlet.jsp.PageContext, java.lang.String, int)
public static int getEscapeDefault(javax.servlet.jsp.PageContext pageContext)
pageContext
- The PageContext object from the JSP.escapeURL(String url)
public static int getEscapeStaticDefault(javax.servlet.jsp.PageContext pageContext)
pageContext
- The PageContext object from the JSP.escapeURL(String url)
public static java.lang.String priceFormat(double price)
Note: this method does perform rounding, so 8.999 will become 9.00. It will also add delimiting characters such as 10000 -> 10,000
price
- a double containing the price to remformatpublic static java.lang.String quantityFormat(double quantity)
quantity
- a double containing the number to format
|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |