© 2001 BEA Systems, Inc.


com.bea.p13n.appflow.webflow
Class WebflowJSPHelper

java.lang.Object
  |
  +--com.bea.p13n.appflow.webflow.WebflowJSPHelper

public class WebflowJSPHelper
extends java.lang.Object

WebflowJSPHelper provides utility methods needed by JSP's when working with webflow and pipeline.


Field Summary
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 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 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, boolean encode)
          Returns a 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)
          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)
          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 getDefaultWebflowNamespace(javax.servlet.jsp.PageContext pageContext)
          Gets the name of the default namespace.
static java.lang.String priceFormat(double price)
          Deprecated.  
static java.lang.String quantityFormat(double quantity)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

P13N_URL_PREFIX_ELEMENT_NAME

public static final 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. This parameter is specified in the web app's web.xml file.

P13N_URL_DOMAIN_NAME

public static final 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. This parameter is specified in the web app's web.xml file.

P13N_APPLICATION_URL_ELEMENT_NAME

public static final 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. This parameter is specified in the web app's web.xml file.

P13N_APPLICATION_URL_DEFAULT

public static final java.lang.String P13N_APPLICATION_URL_DEFAULT
The default servlet path information for webflow. Site developers should be overriding this value by setting a P13N_APPLICATION_URL_ELEMENT_NAME param in the web.xml context parameters.

P13N_STATIC_ROOT_ELEMENT_NAME

public static final 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. This is used in cases where images and other static If this is not specifed, the default is the context path of the last request. This parameter is specified in the web app's web.xml file.

CALCULATE_HTTPS

public static final int CALCULATE_HTTPS
An HTTPSFlag value to be used in createWebflowURL. Indicates that webflow must calculate whether HTTPS needs to be used for this URL.

USE_HTTP

public static final int USE_HTTP
An HTTPSFlag value to be used in createWebflowURL. Indicates that HTTP should be used and not HTTPS.

USE_HTTPS

public static final int USE_HTTPS
An HTTPSFlag value to be used in createWebflowURL. Indicates that HTTPS should be used and not HTTP.

USE_WEBAPP_DEFAULT_HTTPS

public static final int USE_WEBAPP_DEFAULT_HTTPS
An HTTPSFlag value to be used in createWebflowURL. Indicates that the value should be read from the webapp configuration (web.xml HTTPSIND_DEFAULT_VALUE parameter) or CALCULATE_HTTPS if that parameter is missing.

DEFAULT_HTTP_PORT

public static final java.lang.String DEFAULT_HTTP_PORT
If the http port = DEFAULT_HTTP_PORT (80) it will not include it in the URL

DEFAULT_HTTPS_PORT

public static final java.lang.String DEFAULT_HTTPS_PORT
If the https port = DEFAULT_HTTPS_PORT (443) it will not include it in the URL
Constructor Detail

WebflowJSPHelper

public WebflowJSPHelper()
Method Detail

encodeURL

public static java.lang.String encodeURL(javax.servlet.http.HttpServletResponse response,
                                         java.lang.String url)
Encodes a given URL string using response.encodeURL(). This will potentially add a session Id to the URL.

Parameters:
request - HttpServletResponse object.

createWebflowURL

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
Returns a URL for Webflow. This method does not provide a namespace parameter for the origin, so the current namespace is used if it is available, otherwise the webapp's default namespace is used.

Note: this method assumes redirect = false, HTTPSFlag = USE_WEBAPP_DEFAULT_HTTPS and encode = true

Parameters:
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.

createWebflowURL

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
Returns a URL for Webflow.

Note: this method assumes redirect = false, HTTPSFlag = USE_WEBAPP_DEFAULT_HTTPS and encode = true

Parameters:
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.

createWebflowURL

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
Returns a URL for Webflow.

Note: this method assumes HTTPSFlag = USE_WEBAPP_DEFAULT_HTTPS and encode = true

Parameters:
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 URL

createWebflowURL

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
Returns a URL for Webflow.

Note: this method assumes HTTPSFlag = USE_WEBAPP_DEFAULT_HTTPS

Parameters:
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 URL
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.

createWebflowURL

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
Returns a URL for Webflow.

Parameters:
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 URL
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.
HTTPSFlag - an int that can be USE_HTTP, USE_HTTPS, CALCULATE_HTTPS, or USE_WEBAPP_DEFAULT_HTTPS. USE_WEBAPP_DEFAULT_HTTPS is new with 4.0SP2, and is the default as of 4.0SP2. Using this value indicates that the value for this parameter be taken from the HTTPSIND_DEFAULT_VALUE context parameter in web.xml (or CALCULATE_HTTPS if not specified in web.xml). The default for 4.0 and 4.0SP1 is CALCULATE_HTTPS. 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.

createWebflowURL

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)
                                         throws javax.servlet.jsp.JspException
Returns a URL for Webflow.

Parameters:
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.xml
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 URL
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.
HTTPSFlag - an int that can be USE_HTTP, USE_HTTPS, CALCULATE_HTTPS, or USE_WEBAPP_DEFAULT_HTTPS. USE_WEBAPP_DEFAULT_HTTPS is new with 4.0SP2, and is the default as of 4.0SP2. Using this value indicates that the value for this parameter be taken from the HTTPSIND_DEFAULT_VALUE context parameter in web.xml (or CALCULATE_HTTPS if not specified in web.xml). The default for 4.0 and 4.0SP1 is CALCULATE_HTTPS. 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.

createWebflowURL

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)
Returns a URL for Webflow.

Parameters:
context - The ServletContext object from the container.
request - The HttpServletRequest object
response - The HttpServletResponse object
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. 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 URL
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.
HTTPSFlag - an int that can be USE_HTTP, USE_HTTPS, CALCULATE_HTTPS, or USE_WEBAPP_DEFAULT_HTTPS. USE_WEBAPP_DEFAULT_HTTPS is new with 4.0SP2, and is the default as of 4.0SP2. Using this value indicates that the value for this parameter be taken from the HTTPSIND_DEFAULT_VALUE context parameter in web.xml (or CALCULATE_HTTPS if not specified in web.xml). The default for 4.0 and 4.0SP1 is CALCULATE_HTTPS. 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.

createWebflowURL

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)
Returns a URL for Webflow.

Parameters:
context - The ServletContext object from the container.
request - The HttpServletRequest object
response - The HttpServletResponse object
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. 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.xml
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 URL
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.
HTTPSFlag - an int that can be USE_HTTP, USE_HTTPS, CALCULATE_HTTPS, or USE_WEBAPP_DEFAULT_HTTPS. USE_WEBAPP_DEFAULT_HTTPS is new with 4.0SP2, and is the default as of 4.0SP2. Using this value indicates that the value for this parameter be taken from the HTTPSIND_DEFAULT_VALUE context parameter in web.xml (or CALCULATE_HTTPS if not specified in web.xml). The default for 4.0 and 4.0SP1 is CALCULATE_HTTPS. 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.

createStaticResourceURL

public 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. The URL will be relative to the init param P13N_STATIC_ROOT if it is set in web.xml for this webapp. The static root should be of the form "/path1/path2/etc". If not it will be relative to the request's context path.

Note: this method replaces createGIFUrl() from the 3.1 to 3.5 releases

Parameters:
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.
Returns:
a String containing the URL to the resource.

getDefaultWebflowNamespace

public static java.lang.String getDefaultWebflowNamespace(javax.servlet.jsp.PageContext pageContext)
Gets the name of the default namespace.

Parameters:
pageContext - The PageContext object from the JSP.
Returns:
a String containing the name of the default namespace for the current web application (as specified in the web.xml file). Can return null if the default NS is not specified.

priceFormat

public static java.lang.String priceFormat(double price)
Deprecated.  
Formats a price to display in the JSP so that it contains 2 decimal places. This method simply delegates to java.text.NumberFormat. Look to that class if more functionality is needed.

Note: this method does perform rounding, so 8.999 will become 9.00. It will also add delimiting characters such as 10000 -> 10,000

Parameters:
price - a double containing the price to remformat

quantityFormat

public static java.lang.String quantityFormat(double quantity)
Deprecated.  
Formats a quanityt value to display in the JSP so that it contains no decimal places. This method simply delegates to java.text.NumberFormat. Look to that class if more functionality is needed.

Parameters:
quantity - a double containing the number to format

© 2001 BEA Systems, Inc.

Copyright © 2001 BEA Systems, Inc. All Rights Reserved