public final class RequestUtils extends java.lang.Object implements RequestParameters
ACTIONBAR_NAME_PARAM, ADD_ROW_PARAM, ADD_TO_COLLECTION_PARAM, AEF_BUSREL_PARAM, AEF_STRING_RESOURCE_FILE_ID_PARAM, AEF_SUITE_DIR_NEW_PARAM, AEF_SUITE_DIR_PARAM, AEF_SUITE_KEY_PARAM, APPEND_FLAG_PARAM, APPLY_TO_PARAM, ARGUMENT_NAME_PARAM, ARGUMENT_VALUE_PARAM, ASCENDING_PARAM, ASSIGNMENT_NAME_PARAM, ATTRIBUTE_PARAM, BEAN_PARAM, CALLBACK_PARAM, CANCEL_BUTTON, CANCEL_IMAGE, CANCEL_LABEL, CANCEL_TARGET, CANCEL_URL, CATEGORY_MENU_DISABLED_PARAM, CATEGORY_MENU_PARAM, CELL_EDITOR, CELL_VALUE_PARAM, CHOOSABLE_VIEW_NAMES_PARAM, CLASS_NAME_PARAM, COLLAPSE_ON_FILTERCHANGE, COLUMNINDEX_PARAM, COLUMNNAME_PARAM, COLUMNNAMES_PARAM, CONTEXT_MENU, COUNTER_PARAM, DATA_GROUP_COMPARATOR, DATA_ID_PARAM, DATASET_PARAM, DATE_PARAM, DAY_OF_MONTH_PARAM, DELETE_PARAM, DESCRIPTION_PARAM, DIALOG_FORWARD_PARAM, DIALOG_MODE_PARAM, DIRECTION_PARAM, EDIT_FLAG_PARAM, ENTRY_PROCESSOR, ESCAPE_HEADER, ESCAPE_SUBHEADER, EVALUATE_CURRENT_PAGE, EVALUATE_EXPANDABLE_NODES, EVALUATE_VISIBLE_COLUMNS, EXPAND_ALLOWED, EXPAND_PROGRAM_PARAM, EXPAND_ROW_PARAM, EXPAND_TO_PARAM, EXPORT_PARAM, FCS, FILE_PARAM, FILTER_NAME_PARAM, FORMAT_PARAM, GO_THERE_PARAM, GUIBEAN_INFO, HEADER_REPEAT_INTERVAL, HELP_MARKER, HELP_URL, HTML_INPUT_FIELD_PARAM, IMAGE_FORMAT, IMAGE_HANDLER, IMAGE_NAME, IMAGE_RELATED_IMAGE_EXPRESSION, IMAGE_URL, INITIAL_EXPAND_MODE_PARAM, INQUIRY_NAME_PARAM, INSTANTIATE_PARAM, JS_SUBMIT_FUNCTION_PARAM, JSTREEID_PARAM, KEY_DELIMITER, LAZY_LOAD_PARAM, LEVELS_PARAM, LIMIT_PARAM, LOADER_PARAM, LOCALE, LOCK_PARAM, LOGIN_DEST_URL, LOGIN_MODE, MANAGE_COLLECTIONS_PARAM, MENU_NAME_PARAM, MODE_PARAM, MONTH_PARAM, NAME_PARAM, NAVIGATION_BUTTONS_POSITION, NEW_VALUE_PARAM, OBJECT_ID_PARAM, OBJECT_NAME_PARAM, OBJECT_WHERE_PARAM, ORIGIN_OBJECT_ID_PARAM, ORIGIN_OBJECT_NAME_PARAM, OUTPUT_FORMAT_PARAM, OWNER_PARAM, PAGE_HEADER_PARAM, PAGE_PARAM, PAGE_SUB_HEADER_PARAM, PAGECONFIG_PARAM, PAGEORIENTATION_PARAM, PAGESIZE_PARAM, PAGINATION_ON_PARAM, PAGINATION_PARAM, PAGINATION_SIZE_PARAM, PAGINATION_THRESHOLD_PARAM, PARENT_OBJECT_ID_PARAM, PHYSICAL_ID_PARAM, POLICY_PARAM, PORTAL_MODE, PORTAL_PARAM, PREVIEW_ANNOTATION, PRINTER_FRIENDLY_PARAM, PRODUCER, PROFILE_PARAM, PROGRAM_NAME_PARAM, QUERY_NAME_PARAM, RELATIONSHIP_ID_PARAM, RELATIONSHIP_TYPE_PARAM, RELATIONSHIP_WHERE_PARAM, REQUEST_FROM_3DD, REUSE_OBJECT, REVISION_PARAM, ROLE_NAME_PARAM, ROWINDEX_PARAM, SEARCH_NAME_PARAM, SELECTION_BEHAVIOR, SELECTION_PARAM, SELECTION_TRACKING_ENABLED, SELECTSTMT_PARAM, SET_NAME_PARAM, SHOWHIDDENTYPES_PARAM, SIDEPANEL_MODE, STRUCTURE_GUI, STYLESHEET_NAME_PARAM, SUBMIT_CONFIRM, SUBMIT_DOUBLE_CLICK_PREVENTION, SUBMIT_IMAGE, SUBMIT_LABEL, SUBMIT_PROGRESS_MESSAGE, SUBMIT_ROW_SELECT, SUBMIT_SHOW_PROGRESS, SUBMIT_TARGET, SUBMIT_URL, SYMBOLIC_TYPE_PARAM, SYSTEM_TABLE_NAME_PARAM, TABLE_CALCULATION_FILTER, TABLE_FACTORY, TABLE_LAYOUT, TABLE_LINK_FACTORY, TABLE_RENDERER, TARGET_FORWARD_PARAM, TARGET_PAGE_PARAM, TARGET_WINDOW_PARAM, TIME_STAMP_PARAM, TOOLBAR_PARAM, TRANSLATE_FILTERS_TO_MQL, TYPE_PARAM, USER_NAME_PARAM, VALUE_INDEX_PARAM, VAULT_PARAM, VIEW_FACTORY, VIEW_NAME_PARAM, VISIBLE_PARAM, WHERE_PARAM, YEAR_PARAM| Modifier and Type | Method and Description |
|---|---|
static void |
bind(javax.servlet.jsp.PageContext pageContext,
java.lang.String name,
java.lang.Object bean,
java.lang.String scope)
Bind the bean to the specified scope.
|
static java.lang.String[] |
debug(javax.servlet.http.HttpServletRequest request) |
static java.lang.String |
details(javax.servlet.http.HttpServletRequest request) |
static java.lang.String |
details(javax.servlet.http.HttpServletRequest request,
boolean headers,
boolean cookies,
boolean params,
boolean requestAttributes,
boolean sessionAttributes) |
static java.lang.String |
getAbsoluteURL(javax.servlet.http.HttpServletRequest request,
java.lang.String path)
Create and return an absolute URL for the specified context-relative
path, based on the server and context information in the specified
request.
|
static java.lang.String |
getContextRelativeURL(javax.servlet.http.HttpServletRequest request,
java.lang.String path)
Converts an absolute URL into a context relative path.
|
static java.lang.String |
getContextURL(javax.servlet.http.HttpServletRequest request)
Returns the context URL.
|
static java.lang.String |
getCookieValue(javax.servlet.http.HttpServletRequest request,
java.lang.String cookieName) |
static java.lang.String |
getObjectId(javax.servlet.http.HttpServletRequest request)
Returns the object id from the request.
|
static java.lang.String[] |
getObjectIds(javax.servlet.http.HttpServletRequest request,
boolean unique)
Returns the object id from the request.
|
static java.lang.String |
getParameter(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
Returns the value of the parameter with the specified name.
|
static java.lang.String |
getParameter(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.String defaultValue)
Returns the value of the parameter with the specified name.
|
static java.lang.String[] |
getParameterAsArray(javax.servlet.http.HttpServletRequest request,
java.lang.String name) |
static java.lang.String[] |
getParameterAsArray(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.String delim) |
static java.lang.String[] |
getParameterAsArray(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.String delim,
java.lang.String[] defaultValue) |
static java.lang.Boolean |
getParameterAsBoolean(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
Returns the value of the parameter with the specified name.
|
static boolean |
getParameterAsBoolean(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
boolean defaultValue)
Returns the value of the parameter with the specified name.
|
static java.lang.Boolean |
getParameterAsBoolean(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.Boolean defaultValue)
Returns the value of the parameter with the specified name.
|
static java.lang.Double |
getParameterAsDouble(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
Returns the value of the parameter with the specified name.
|
static java.lang.Double |
getParameterAsDouble(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.Double defaultValue)
Returns the value of the parameter with the specified name.
|
static float |
getParameterAsFloat(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
float defaultValue)
Returns the value of the parameter with the specified name as a float
value.
|
static java.lang.Integer |
getParameterAsInteger(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
Returns the value of the parameter with the specified name.
|
static int |
getParameterAsInteger(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
int defaultValue) |
static java.lang.Integer |
getParameterAsInteger(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.Integer defaultValue)
Returns the value of the parameter with the specified name.
|
static java.lang.Long |
getParameterAsLong(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
Returns the value of the parameter with the specified name.
|
static java.lang.Long |
getParameterAsLong(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.Long defaultValue)
Returns the value of the parameter with the specified name.
|
static java.util.Enumeration<java.lang.String> |
getParameterNames(javax.servlet.http.HttpServletRequest request) |
static java.lang.String[] |
getParameterValues(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
Returns the value of the parameter with the specified name.
|
static java.lang.String[] |
getParameterValues(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.String[] defaultValues)
Returns the values of the parameter with the specified name.
|
static java.util.Map<java.lang.String,java.lang.String[]> |
getRequestMap(javax.servlet.http.HttpServletRequest request) |
static java.lang.String |
getRequestParametersAsQueryString(javax.servlet.http.HttpServletRequest request)
Returns all request parameters as a querystring.
|
static java.lang.String |
getServerURL(javax.servlet.http.HttpServletRequest request)
Returns the server URL.
|
static java.lang.String |
getServletDirectoryPath(javax.servlet.http.HttpServletRequest request)
Returns the server relative path for the directory in which the servlet
or jsp resides.
|
static java.lang.String |
getServletDirectoryPath(javax.servlet.http.HttpServletRequest request,
int level)
Returns the server relative path for the directory in which the servlet
or jsp resides.
|
static java.lang.String |
getServletPath(javax.servlet.http.HttpServletRequest request)
Returns the servlet path.
|
static java.lang.String[] |
getSubmittedIds(javax.servlet.http.HttpServletRequest request,
boolean unique)
Returns the object id from the request.
|
static java.lang.Object |
lookup(javax.servlet.jsp.PageContext pageContext,
java.lang.String name,
java.lang.String scope)
Locate and return the specified bean, from an optionally specified scope,
in the specified page context.
|
static Environment |
newEnv(javax.servlet.http.HttpServletRequest req)
Creates a new
Environment instance |
static Environment |
newEnv(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Creates a new
Environment instance |
static Environment |
newEnv(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
java.util.Map<? extends java.lang.Object,? extends java.lang.Object> env)
Creates a new
Environment instance |
static java.util.Map<java.lang.String,java.lang.String> |
toMap(javax.servlet.http.HttpServletRequest request) |
static java.util.Map<java.lang.String,java.lang.String> |
toMap(javax.servlet.http.HttpServletRequest request,
java.util.Map<java.lang.String,java.lang.String> rv) |
static java.util.Map<java.lang.String,java.lang.String[]> |
toValuesMap(javax.servlet.http.HttpServletRequest request) |
static java.util.Map<java.lang.String,java.lang.String[]> |
toValuesMap(javax.servlet.http.HttpServletRequest request,
java.util.Map<java.lang.String,java.lang.String[]> rv) |
static void |
unbind(javax.servlet.jsp.PageContext pageContext,
java.lang.String name,
java.lang.String scope)
Unbind the bean from the specified scope.
|
public static Environment newEnv(javax.servlet.http.HttpServletRequest req)
Environment instancereq - The current request objectenv instance.public static Environment newEnv(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
Environment instancereq - The current request objectresp - The current response object.env instance.public static Environment newEnv(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, java.util.Map<? extends java.lang.Object,? extends java.lang.Object> env)
Environment instancereq - The current request objectresp - The current response object.env - A custom map with env parameters.env instance.public static java.lang.String getObjectId(javax.servlet.http.HttpServletRequest request)
request - The request.public static java.lang.String[] getObjectIds(javax.servlet.http.HttpServletRequest request,
boolean unique)
request - The current requestunique - True if to return unique ids only.public static java.lang.String[] getSubmittedIds(javax.servlet.http.HttpServletRequest request,
boolean unique)
request - The current requestunique - True if to return unique ids only.public static java.lang.String getServerURL(javax.servlet.http.HttpServletRequest request)
request - the current request.public static java.lang.String getContextURL(javax.servlet.http.HttpServletRequest request)
request - the current request.public static java.lang.String getContextRelativeURL(javax.servlet.http.HttpServletRequest request,
java.lang.String path)
request - The requestpath - The path to transformpublic static java.lang.String getAbsoluteURL(javax.servlet.http.HttpServletRequest request,
java.lang.String path)
request - The servlet request we are processingpath - The context-relative path (may start with / or not)public static java.lang.String getServletPath(javax.servlet.http.HttpServletRequest request)
public static java.lang.String getServletDirectoryPath(javax.servlet.http.HttpServletRequest request)
public static java.lang.String getServletDirectoryPath(javax.servlet.http.HttpServletRequest request,
int level)
public static java.lang.Object lookup(javax.servlet.jsp.PageContext pageContext,
java.lang.String name,
java.lang.String scope)
throws javax.servlet.jsp.JspException
null instead.pageContext - Page context to be searchedname - Name of the bean to be retrievedscope - Scope to be searched (page, request, session, application)
or null to use findAttribute() insteadjavax.servlet.jsp.JspException - if an invalid scope name is requestedpublic static void bind(javax.servlet.jsp.PageContext pageContext,
java.lang.String name,
java.lang.Object bean,
java.lang.String scope)
throws javax.servlet.jsp.JspException
pageContext - The page context.name - The name of the bean.bean - The bean.scope - The scope to bind the bean in (page, request, session,
application). Default scope is page.javax.servlet.jsp.JspException - if an invalid scope name is requestedpublic static void unbind(javax.servlet.jsp.PageContext pageContext,
java.lang.String name,
java.lang.String scope)
throws javax.servlet.jsp.JspException
pageContext - The page context.name - The name of the bean.scope - The scope from which to unbind the bean (page, request,
session, application). Default scope is page.javax.servlet.jsp.JspException - if an invalid scope name is requestedpublic static java.lang.String getRequestParametersAsQueryString(javax.servlet.http.HttpServletRequest request)
public static java.lang.String details(javax.servlet.http.HttpServletRequest request)
public static java.lang.String details(javax.servlet.http.HttpServletRequest request,
boolean headers,
boolean cookies,
boolean params,
boolean requestAttributes,
boolean sessionAttributes)
public static java.lang.String[] debug(javax.servlet.http.HttpServletRequest request)
public static java.util.Enumeration<java.lang.String> getParameterNames(javax.servlet.http.HttpServletRequest request)
public static java.lang.String getParameter(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.String defaultValue)
request - the request.name - the name of the parameter.defaultValue - the default value of the parameter.public static java.lang.String getParameter(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
request - the request.name - the name of the parameter.public static java.lang.String[] getParameterAsArray(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.String delim,
java.lang.String[] defaultValue)
public static java.lang.String[] getParameterAsArray(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.String delim)
public static java.lang.String[] getParameterAsArray(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
public static java.lang.String[] getParameterValues(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.String[] defaultValues)
request - the request.name - the name of the parameter.defaultValues - the default values of the parameter.public static java.lang.String[] getParameterValues(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
request - the request.name - the name of the parameter.public static java.lang.Integer getParameterAsInteger(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.Integer defaultValue)
request - the request.name - the name of the parameter.defaultValue - the default value of the parameter.public static java.lang.Integer getParameterAsInteger(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
request - the request.name - the name of the parameter.public static int getParameterAsInteger(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
int defaultValue)
request - the request.name - the name of the parameter.defaultValue - The default valuepublic static java.lang.Long getParameterAsLong(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.Long defaultValue)
request - the request.name - the name of the parameter.defaultValue - the default value of the parameter.public static java.lang.Long getParameterAsLong(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
request - the request.name - the name of the parameter.public static java.lang.Double getParameterAsDouble(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.Double defaultValue)
request - the request.name - the name of the parameter.defaultValue - the default value of the parameter.public static float getParameterAsFloat(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
float defaultValue)
request - the request.name - the name of the parameter.defaultValue - the default value of the parameter.public static java.lang.Double getParameterAsDouble(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
request - the request.name - the name of the parameter.public static boolean getParameterAsBoolean(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
boolean defaultValue)
request - the request.name - the name of the parameter.defaultValue - the default value of the parameter.public static java.lang.Boolean getParameterAsBoolean(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.Boolean defaultValue)
request - the request.name - the name of the parameter.defaultValue - the default value of the parameter.public static java.lang.Boolean getParameterAsBoolean(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
request - the request.name - the name of the parameter.public static java.util.Map<java.lang.String,java.lang.String> toMap(javax.servlet.http.HttpServletRequest request)
public static java.util.Map<java.lang.String,java.lang.String> toMap(javax.servlet.http.HttpServletRequest request,
java.util.Map<java.lang.String,java.lang.String> rv)
public static java.util.Map<java.lang.String,java.lang.String[]> toValuesMap(javax.servlet.http.HttpServletRequest request)
public static java.util.Map<java.lang.String,java.lang.String[]> toValuesMap(javax.servlet.http.HttpServletRequest request,
java.util.Map<java.lang.String,java.lang.String[]> rv)
public static java.lang.String getCookieValue(javax.servlet.http.HttpServletRequest request,
java.lang.String cookieName)
request - The request objectcookieName - The name of the cookiepublic static java.util.Map<java.lang.String,java.lang.String[]> getRequestMap(javax.servlet.http.HttpServletRequest request)
Copyright ? Technia AB. All Rights Reserved.