|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.servlet.ServletUtil
public class ServletUtil
This class file implements some static utilities that are useful wrappers for those implementing servlets.
Nested Class Summary | |
---|---|
static class |
ServletUtil.ServletThreadContextValueCopier
|
Field Summary | |
---|---|
static java.lang.String |
APPSERVER_CONFIG_NUCLEUS_PATH
|
static java.lang.String |
APPSERVER_NAME
|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
CONTEXT_PATHS
|
static java.lang.String |
DAF_DROPLET_EVENT_SERVLET_NAME
|
static java.lang.String |
DEFAULT_CHARACTER_ENCODING
Default character encoding per SRV.4.9 |
static java.lang.String |
DROPLET_EVENT_SERVLET_NAME
|
static java.lang.String |
DYNAMO_INITIAL_CONTEXT_POOL_PATH
|
static java.lang.String |
DYNAMO_SESSION_MANAGER_PATH
|
static ParameterName |
FORM_NAME
|
static java.lang.String |
GENERIC_SESSION_MANAGER_PATH
|
static java.lang.String |
HOST_SERVLET_CONTEXT_ATTR
|
static java.lang.String |
IBM_MANAGED_SERVER_CLASS
|
static ParameterName |
IMPORTS_NAME
|
static java.lang.String |
JNDI_PATH_PROFILE
The JNDI path of the current profile for DAS. |
static java.lang.String |
JNDI_PATH_REQUEST
The JNDI path of the request for DAS. |
static java.lang.String |
JNDI_PATH_RESPONSE
The JNDI path of the response for DAS. |
static java.lang.String |
JOB_REGISTRY_PATH
|
static ParameterName |
LOCALE_PARAM
Request parameter that identifies the desired locale for user messages. |
static boolean |
mLoggingDebug
Deprecated. |
static boolean |
mLoggingError
Deprecated. |
static java.lang.String |
NO_FLUSH_RESPONSE_CONTEXT_ATTR
Attribute where we stash our NoFlushHttpServletResponse during a DSP PageTag. |
static java.lang.String |
PAGE_FILTER_CHAIN_ATTRIBUTE
|
static java.lang.String |
PAGE_FILTER_ENABLED
|
static java.lang.String |
POST_FORWARD_URI_ATTR
|
static java.lang.String |
POST_REQUEST_JOB_IDS
|
static java.lang.String |
POST_REQUEST_PROCESSOR_OWNER
|
static java.lang.String |
POST_REQUEST_PROCESSORS_NAME
|
static java.lang.String |
PRE_FORWARD_CONTEXT_PATH_ATTR
|
static java.lang.String |
PRE_FORWARD_URI_ATTR
|
static java.lang.String |
PRE_FORWARD_URI_WITH_QUERY_STRING_ATTR
|
static boolean |
sDynamoAppServer
|
static boolean |
sDynamoAppServerSet
|
static java.lang.String |
SESSION_NAME_CONTEXT_NAME
|
static java.lang.String |
SESSION_NEEDS_RESTORE
|
static java.lang.String |
SESSION_RESTORED_MARKER
|
static atg.servlet.JobRegistry |
sJobRegistry
|
static javax.naming.InitialContext |
sWorkingInitialContext
Returns the UserTransaction object for use by dynamo applications. |
static java.lang.String |
USE_XML_PARAM_DELIMITER
This can be set from the dsp:page and the dsp:isxml tags. |
static java.lang.String |
WINDOW_SESSION_NAME
|
Constructor Summary | |
---|---|
ServletUtil()
|
Method Summary | |
---|---|
static void |
addPostRequestProcessor(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse,
atg.servlet.PostRequestProcessor pProcessor,
java.lang.String pOwnerName)
Pipeline servlets that require actions to be performed after the completion of the request (usually to clean up some action performed before calling "passRequest") should not directly perform those actions after calling passRequest. |
static void |
callServlet(javax.servlet.Servlet pServlet,
java.lang.String pName,
javax.servlet.ServletRequest pReq,
javax.servlet.ServletResponse pRes)
Just invokes the servlet right now. |
static void |
checkInTag(atg.servlet.pagecompile.taglib.TagWrapper[] pWrappers,
int pIndex)
Check in the tag at pIndex of pWrappers. |
static boolean |
checkIsSingleByteEncoding(java.lang.String pEncoding)
Returns false if the provided character encoding requires a reader/writer, true if it doesn't. |
static boolean |
checkIsSingleByteEncodingIgnoringCase(java.lang.String pEncoding)
Returns false if the provided character encoding requires a reader/writer, true if it doesn't. |
static boolean |
checkIsValidCharacterEncoding(java.lang.String pEncoding)
Determines whether the provided encoding is a valid and supported by the current VM. |
static javax.servlet.jsp.tagext.Tag |
checkOutInitTag(atg.servlet.pagecompile.taglib.TagManager pTagManager,
atg.servlet.pagecompile.taglib.TagWrapper[] pWrappers,
int pIndex,
java.lang.String pAttSet,
javax.servlet.jsp.PageContext pPageContext,
javax.servlet.jsp.tagext.Tag pParentTag)
Check out a TagWrapper from pTagManager, and set the pIndex element of the pWrappers array to the checked out TagWrapper. |
javax.servlet.jsp.tagext.Tag |
checkOutTag(atg.servlet.pagecompile.taglib.TagManager pTagManager,
atg.servlet.pagecompile.taglib.TagWrapper[] pWrappers,
int pIndex,
java.lang.String pAttSet)
Check out a TagWrapper from pTagManager, and set the pIndex element of the pWrappers array to the checked out TagWrapper. |
static java.lang.Throwable |
cleanUpTags(javax.servlet.jsp.tagext.Tag[] pTags)
Run through the pTags array, releasing any tags still in the list. |
static java.lang.Throwable |
cleanUpTags(atg.servlet.pagecompile.taglib.TagWrapper[] pWrappers)
Run through the pWrappers array, check-in any tags still in the list. |
protected static void |
clearIncludeAttributes(javax.servlet.http.HttpServletRequest pRequest)
Blindly clear out all the include attributes. |
static java.lang.Object |
convertPropertyValue(java.lang.String pValue,
java.lang.Class pClass,
NameResolver pContext)
Converts the specified value to the specified class. |
static java.util.Dictionary |
convertStringToDictionary(DynamoHttpServletRequest pRequest,
java.lang.String pValue)
For a given string value of the form: |
static java.lang.String |
convertToNativeString(java.lang.String pValue,
java.lang.String pEncoding)
This method converts the unicode string supplied to a string encoded in the native encoding supplied. |
static atg.servlet.ExtendedAttributesCookie.ExtendedAttributesCookieImpl |
createCookie(java.lang.String pName,
java.lang.String pValue)
Create a new ExtendedAttributesCookieImpl using the specified name and value. |
static java.lang.Object |
doPropertySetAsText(java.lang.Class pClass,
java.lang.String pValue)
Gets an appropriate PropertyEditor and uses it to convert the specified value to the specified class. |
static void |
embed(java.lang.String pPath,
DynamoHttpServletRequest request,
javax.servlet.ServletResponse response)
Embeds an html or jhtml file into the current request. |
static void |
embed(java.lang.String pPath,
javax.servlet.Servlet pServlet,
DynamoHttpServletRequest request,
javax.servlet.ServletResponse response)
Deprecated. |
static java.lang.String |
escapeHtmlString(java.lang.String pStr)
Returns a string that is properly escaped for use either as an HTML attribute value or an HTML content section. |
static java.lang.String |
escapeHtmlString(java.lang.String pStr,
boolean pEscapeAmp)
Returns a string that is properly escaped for use either as an HTML attribute value or an HTML content section. |
static java.lang.String |
escapeURLString(java.lang.String pStr)
Return the passed in String as a URL encoded String. |
static void |
execCgi(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse,
java.lang.String pPath,
boolean pIsCgi)
Executes the CGI command passed in with pPath. |
static java.lang.String |
fileLastMod(DynamoHttpServletRequest pRequest,
java.lang.String pDocPath)
Finds the file on disk and returns it's last modification date/time formatted according to the DATE_FORMAT request attribute. |
static java.lang.String |
fileSize(DynamoHttpServletRequest pRequest,
java.lang.String pDocPath)
Finds the file on disk and returns it's size in bytes in a string formatted according to the SIZE_FORMAT request attribute. |
static void |
flushBeforeInclude(DynamoHttpServletResponse pRes)
This method should be invoked before an RequestDispatcher.include if one does not have access to PageContext (such as in a servlet). |
static void |
flushBeforeInclude(javax.servlet.jsp.JspWriter pOut)
If the given JspWriter is a BodyContent this method will call writeOut on that BodyContent and all of its enclosing BodyContents. Finally when a non BodyContent JspWriter is encountered that JspWriter will be flushed with flush(). |
static java.lang.String |
formattedDate(DynamoHttpServletRequest pRequest,
long pTimeMillis,
java.util.TimeZone pTimeZone)
Formats the given date according to the timefmt set by the SSI config command. |
static atg.service.dynamo.AppServerConfig |
getAppServerConfig()
|
static java.lang.String[] |
getCleanClassPathArrayWithLocallib(atg.applauncher.AppLauncher pLauncher)
Returns classPath with locallib elements without enries that marked as ignored in manifest files (see ATG-Assembler-Class-Path-Ignore manifest attribute). |
static java.lang.String |
getContentCharset(java.lang.String mimeType)
Returns the content charset with the default if it is not set |
static java.lang.String |
getContentCharset(java.lang.String mimeType,
java.lang.String pDefault)
Returns the content type used for reading this data. |
static java.lang.String |
getCurrentContextPath(javax.servlet.http.HttpServletRequest pRequest)
Get the current context path... |
static java.lang.String |
getCurrentContextPath(javax.servlet.http.HttpServletRequest pRequest,
boolean pInInclude)
Get the current context path... |
static java.lang.String |
getCurrentPathInfo(javax.servlet.http.HttpServletRequest pRequest)
Get the current path info... |
static java.lang.String |
getCurrentPathInfo(javax.servlet.http.HttpServletRequest pRequest,
boolean pInInclude)
Get the current path info... |
static java.lang.String |
getCurrentPathTranslated(javax.servlet.http.HttpServletRequest pRequest)
Get the current path translated... |
static java.lang.String |
getCurrentPathTranslated(javax.servlet.http.HttpServletRequest pRequest,
boolean pInInclude)
Get the current path translated... |
static java.lang.String |
getCurrentQueryString(javax.servlet.http.HttpServletRequest pRequest)
Get the current query string... |
static java.lang.String |
getCurrentQueryString(javax.servlet.http.HttpServletRequest pRequest,
boolean pInInclude)
Get the current query string... |
static DynamoHttpServletRequest |
getCurrentRequest()
Returns the request associated with the current thread, null if there is no such request. |
static java.lang.String |
getCurrentRequestURI(javax.servlet.http.HttpServletRequest pRequest)
Get the current request URI... |
static DynamoHttpServletResponse |
getCurrentResponse()
Returns the response associated with the current thread, null if there is no such response. |
static javax.servlet.ServletContext |
getCurrentServletContext(javax.servlet.http.HttpServletRequest pRequest)
Get the current requests ServletContext. |
static java.lang.String |
getCurrentServletContextName(javax.servlet.http.HttpServletRequest pRequest)
Get the current requests ServletContextName. |
static java.lang.String |
getCurrentServletPath(javax.servlet.http.HttpServletRequest pRequest)
Get the current serlvet path... |
static java.lang.String |
getCurrentServletPath(javax.servlet.http.HttpServletRequest pRequest,
boolean pInInclude)
Get the current serlvet path... |
static RepositoryItem |
getCurrentUserProfile()
Returns the profile associated with the current thread, null if there is no such profile. |
static DropletEventServlet |
getDropletEventServlet()
Returns the DropletEventServlet, extracting it from Dynamo through JNDI. |
static DynamoHttpServletRequest |
getDynamoRequest(javax.servlet.ServletContext pContext,
javax.servlet.ServletRequest pRequest,
javax.servlet.ServletResponse pResponse)
Get's the DynamoHttpServletRequest, creating it if necessary. |
static DynamoHttpServletRequest |
getDynamoRequest(javax.servlet.ServletRequest pRequest)
Retrieves the DynamoHttpServletRequest from the given regular ServletRequest. |
static DynamoHttpServletResponse |
getDynamoResponse(javax.servlet.ServletRequest pRequest,
javax.servlet.ServletResponse pResponse)
Returns the DynamoHttpServletResponse associated with the current request |
static javax.servlet.http.HttpSession |
getGlobalSession(boolean create)
Get the global, parent session. |
static java.lang.String |
getHostHeader(javax.servlet.http.HttpServletRequest pRequest)
Return the host header. |
static java.lang.String |
getJBoss5JspClasspath(javax.servlet.ServletContext sc)
Returns JBoss5 class path |
static java.lang.String |
getJBoss5PageCompileClasspath()
Returns JBoss5 page compile class path |
static java.lang.String |
getJBossJspClasspath()
|
static java.lang.String |
getJBossJspClasspath(javax.servlet.ServletContext sc)
|
static java.lang.String |
getJspClasspath(javax.servlet.ServletContext pContext)
If we are on a 3PAS returns the classpath used by that appserver for compiling jsp pages. |
static java.lang.String |
getLiteralCurrentPathTranslated(javax.servlet.http.HttpServletRequest pRequest,
boolean pInInclude)
Get the current path translated... |
static javax.servlet.RequestDispatcher |
getLocalRequestDispatcher(javax.servlet.http.HttpServletRequest pRequest,
java.lang.String pPath)
Returns a request dispatcher for pPath in the curent web-app. |
static java.lang.String |
getNewBaseDirectory(DynamoHttpServletRequest pRequest,
javax.servlet.ServletContext pServletContext,
java.lang.String pNewURI)
Return the new directory for the specified URL, if it differs from the current base directory. |
static java.util.Locale |
getNonDefaultUserLocale(DynamoHttpServletRequest pRequest,
boolean pUseRequestLocale)
Returns the locale to use when looking up localized messages that will be shown to the user. |
static java.lang.String |
getParamDelimiter(DynamoHttpServletRequest pReq)
Returns the Parameter Delimiter for a request. |
static java.lang.String |
getParentSessionId(javax.servlet.http.HttpServletRequest pRequest)
Returns the parent session id. |
static java.lang.String |
getParentSessionIdFromAttribute(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpSession pSession)
Return the parent session id of the session by fetching from the holder contains in the PARENT_SESSION_ID_ATTR session attribute. |
static java.lang.String |
getParentSessionIdFromAttribute(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpSession pSession,
boolean pCopyToRequest)
Return the parent session id of the session by fetching from the holder contains in the PARENT_SESSION_ID_ATTR session attribute. |
static java.lang.String |
getParentSessionIdFromAttribute(javax.servlet.http.HttpSession pSession)
Return the parent session id of the session by fetching from the holder contains in the PARENT_SESSION_ID_ATTR session attribute. |
static java.lang.String |
getParentSessionIdFromRequestAttribute(javax.servlet.http.HttpServletRequest pRequest)
Return the parent session id from request attribute. |
static java.lang.Object |
getPropertyValue(DynamoHttpServletRequest pRequest,
java.lang.String pPropertyPath)
Returns the object property value for the specified component and the specified path. |
static java.lang.Object |
getPropertyValue(javax.servlet.ServletRequest pRequest,
java.lang.String pPropertyPath)
Returns the object property value for the specified component and the specified path. |
static javax.servlet.RequestDispatcher |
getRequestDispatcher(javax.servlet.http.HttpServletRequest pRequest,
java.lang.String pContextPath,
java.lang.String pPath)
Returns a request dispatcher for pPath in the curent web-app. |
static java.lang.String |
getRequestURI(DynamoHttpServletRequest pRequest,
java.lang.String pURL)
Get the requestURI that will be returned when the server requests the URL. |
static java.lang.String |
getRequestURI(DynamoHttpServletRequest pRequest,
java.lang.String pURL,
boolean pStripQueryParams)
Get the requestURI that will be returned when the server requests the URL |
static java.lang.String |
getRequestURI(javax.servlet.http.HttpServletRequest pRequest,
java.lang.String pURL)
Get the requestURI that will be returned when the server requests the URL. |
static java.lang.String |
getRequestURI(javax.servlet.http.HttpServletRequest pRequest,
java.lang.String pURL,
boolean pStripQueryParams)
Get the requestURI that will be returned when the server requests the URL |
static java.lang.String |
getRequestURI(javax.servlet.ServletRequest pReq)
Return the Dynamo specific ReuestURI, this can be different from pReq.getRequestURI() in the case of running with a different app server. |
static java.lang.String |
getRequestURIFromPathInfo(javax.servlet.http.HttpServletRequest pRequest,
java.lang.String pPath)
Returns the given path prepended with the contextPath and servletPath (if they are set) |
static java.lang.String |
getRequestURL(javax.servlet.http.HttpServletRequest pRequest,
java.lang.String pURI)
Given a potentially relative URL of the form "/xxx" or "../xxx", this returns the absolute URL you'd use to request this page (i.e. |
static atg.servlet.ServletUtilService |
getService()
Return the service we use for configuration and logging. |
static atg.servlet.ServletThreadContext |
getServletThreadContextToRestore()
Get a copy of the current ServletThreadContext to restore later via restoreServletThreadContext. |
static javax.servlet.http.HttpServletRequest |
getSessionConfNumCacheRequest()
get SessionConfNumCacheRequest |
static atg.servlet.sessiontracking.DynamoSessionManager |
getSessionManager()
Returns the session manager for the current installation. In DAF this returns a GenericSessionManager in Dynamo it returns a SessionManager |
static NameContext |
getSessionNameContext(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpSession pSession,
Nucleus pNucleus)
Returns the NameContext associated with a given session. |
static java.lang.String |
getStackTrace(java.lang.Throwable pThrowable)
Returns the stack trace of an exception as a string. |
static atg.servlet.pagecompile.taglib.TagManager |
getTagManager(DynamoHttpServletRequest pRequest,
java.lang.String pTagLibURI,
java.lang.String pTagName,
int pLineNumber)
|
static atg.servlet.pagecompile.taglib.TagManager |
getTagManager(DynamoHttpServletRequest pRequest,
java.lang.String pTagLibURI,
java.lang.String pResovledTagLibURI,
java.lang.String pTagName,
int pLineNumber)
|
static boolean |
getUseExternalTransactionManager()
Returns the true if we are using the external app server Transaction Manager |
static java.util.Locale |
getUserLocale()
Returns the locale to use when looking up localized messages that will be shown to the user. |
static java.util.Locale |
getUserLocale(DynamoHttpServletRequest pRequest)
Returns the locale to use when looking up localized messages that will be shown to the user. |
static java.util.Locale |
getUserLocale(DynamoHttpServletRequest pRequest,
boolean pUseRequestLocale)
Returns the locale to use when looking up localized messages that will be shown to the user. |
static javax.transaction.UserTransaction |
getUserTransaction()
|
static java.lang.String |
getUserTransactionURL()
Returns the URL used to retrieve UserTransaction objects. |
static java.lang.String |
getWeblogicJspClasspath()
|
static java.lang.String |
getWebSphereJspClasspath()
|
static java.lang.String |
getWebsphereServerName()
Returns the name of the Websphere AE server this method was invoked in. Returns null if the name cannot be determined, or if the current application server is not Websphere AE. |
static atg.nucleus.WindowScopeSession |
getWindowSession()
|
static void |
handleJspTagIOException(java.io.IOException pException)
Utility method to attempt to "do the right thing" when encountering an IOException inside a JSP Tag, whose methods cannot throw IOException, so much throw some kind of JspException. |
static void |
handleJspTagIOException(java.lang.String pMessage,
java.io.IOException pException)
Utility method to attempt to "do the right thing" when encountering an IOException inside a JSP Tag, whose methods cannot throw IOException, so much throw some kind of JspException. |
static boolean |
inInclude(javax.servlet.ServletRequest pRequest)
Whether we are current within a RequestDispatcher.include() |
static javax.servlet.jsp.tagext.Tag |
initTag(javax.servlet.jsp.tagext.Tag pTag,
javax.servlet.jsp.tagext.Tag[] pTags,
int pIndex,
javax.servlet.jsp.PageContext pPageContext,
javax.servlet.jsp.tagext.Tag pParentTag)
Initialize pTag by setting the pageContext and parentTag. |
static void |
invalidateSession(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpSession pSession)
On DAF this method makes sure that the "parent" session gets invalided when you attempt to invalide a child session. |
static void |
invalidateSession(javax.servlet.http.HttpSession pSession)
Deprecated. |
static void |
invalidateSessionNameContext(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpSession pSession)
Deprecated. |
static void |
invalidateSessionNameContext(javax.servlet.http.HttpSession pSession)
Deprecated. |
static void |
invalidateSessionsAndSessionNameContexts(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpSession pSession,
boolean pInvalidateAllChildren)
Invokes invalidateSessionNameContext and invalidateSession, and always invalidates parent session. |
static void |
invokeInclude(javax.servlet.RequestDispatcher pDispatcher,
javax.servlet.ServletRequest pRequest,
javax.servlet.ServletResponse pResponse)
Invoke an include, and restore the state of the dynamo request and respose pointers afterwards. |
static void |
invokeNoFlushInclude(javax.servlet.RequestDispatcher pDispatcher,
javax.servlet.ServletRequest pRequest,
javax.servlet.ServletResponse pResponse)
Invoke an include which attempts NOT to flush. |
static boolean |
isCreateHttpOnlyCookies()
Returns property createHttpOnlyCookies. |
static boolean |
isDynamoJ2EEServer()
This method can be used to determine whether or not you are running on a dynamo J2EE server. |
static boolean |
isEquivalentCharset(java.lang.String pOldCharset,
java.lang.String pNewCharset)
Returns true if the two charsets are *effectively* equivalent. |
static boolean |
isGenericJ2EEServer()
Return true if we are running on a Tomcat servlet container. |
static boolean |
isJBoss()
Return true if we are running on a Tomcat servlet container. |
static boolean |
isJBoss5()
|
static boolean |
isPageFilterEnabled(DynamoHttpServletRequest pRequest)
Returns true if DAF requests are being handled by a servlet 2.3 filter and funneled through the dafpipline. |
static boolean |
isUsingURLRewriting(javax.servlet.http.HttpServletRequest pRequest)
This method returns true if this request is using URL rewriting. |
static boolean |
isWebLogic()
Return true if we are running on WebLogic. |
static boolean |
isWebSphere()
Return true if we are running on WebSphere. |
static javax.servlet.Servlet |
loadServlet(DynamoHttpServletRequest pRequest,
java.lang.String pName,
java.lang.String pCode,
java.lang.String pCodeBase,
java.util.Properties pArgs)
Loads the servlet with the specified, name, code, codebase and arguments. |
static java.lang.Object |
lookupInInitialContext(java.lang.String pName)
Do a lookup using a generic InitialContext... |
static java.lang.String |
makeURIAbsolute(java.lang.String pLocation,
DynamoHttpServletRequest pRequest)
Make a relative path an absolute URI (no host or protocol). |
static java.lang.String |
makeURIAbsolute(java.lang.String pLocation,
javax.servlet.http.HttpServletRequest pRequest,
int pEncodeContextPathMode,
boolean pEncodeServletPath)
Make a relative path an absolute URI (no host or protocol). |
static java.lang.String |
makeURIAbsoluteURL(java.lang.String pLocation,
DynamoHttpServletRequest pRequest)
Make a relative path an absolute URI (no host or protocol). |
static java.lang.String |
makeURIAbsoluteURL(java.lang.String pLocation,
javax.servlet.http.HttpServletRequest pRequest,
int pEncodeContextPathMode,
boolean pEncodeServletPath)
Make a relative path an absolute URI (no host or protocol). |
static javax.servlet.jsp.JspWriter |
popBody(javax.servlet.jsp.PageContext pPageContext,
boolean[] pBodyContentsPushed,
int pIndex)
Do a popBody, and record at pIndex of pBodyContentsPushed that that body was popped. |
static javax.servlet.jsp.JspWriter |
popBodyContents(javax.servlet.jsp.PageContext pPageContext,
javax.servlet.jsp.JspWriter pOut,
boolean[] pBodyContentsPushed)
Run through the pBodyContentsPushed boolean array, and pop any body contents that are marked as pushed. |
static javax.servlet.jsp.JspWriter |
popBodyContents(javax.servlet.jsp.PageContext pPageContext,
javax.servlet.jsp.JspWriter pOut,
boolean[] pBodyContentsPushed,
int pFromIndex,
int pToIndex)
Run through a specific range of the the pBodyContentsPushed boolean array, and pop any body contents that are marked as pushed. |
static java.lang.String |
prependSchemeAndHost(javax.servlet.http.HttpServletRequest pRequest,
java.lang.String pURI)
Prepend the scheme and the host (and possibly port) as appropriate. |
static java.lang.String |
prependSchemeAndHost(java.lang.String pScheme,
java.lang.String pHost,
int pPort,
java.lang.String pURI)
Prepend the scheme and the host (and possibly port) as appropriate. |
static void |
printStackTrace(java.lang.Throwable pThrowable,
javax.servlet.ServletOutputStream pOut)
Prints the stack trace of an exception with the given ServletOutputStream. |
static void |
processPostRequestProcessors(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Executes the post request processors. |
static java.lang.String |
processRedirectURL(java.lang.String pPath,
DynamoHttpServletRequest pRequest,
boolean pEncodeSessionId)
Handles the path processing required of Servlet 2.3's rendition of sendRedirect(). |
static javax.servlet.jsp.JspWriter |
pushBody(javax.servlet.jsp.PageContext pPageContext,
boolean[] pBodyContentsPushed,
int pIndex)
Do a pushBody, and record at pIndex of pBodyContentsPushed that that body was pushed. |
static atg.servlet.RequestStateRestorer |
recordAndClearIncludeAttributes(javax.servlet.http.HttpServletRequest pRequest)
Record and clear (if needed) any servlet include attributes on the request. |
static void |
releaseTag(javax.servlet.jsp.tagext.Tag[] pTags,
int pIndex)
Call release on the tag at pIndex of pTags. |
static void |
reportLeakedCurrentRequest()
Dump the last set location. |
static java.lang.String |
resolvePathFromRelativeURL(java.lang.String pRelativeURL,
java.lang.String pFilePath)
Takes a relative URL (i.e. |
static java.lang.String |
resolveTranslatedPathFromURI(java.lang.String pPath,
DynamoHttpServletRequest pRequest)
Takes a URI and a request it is associated with. |
static void |
restoreServletThreadContext(atg.servlet.ServletThreadContext pRestore)
Restore the current ServletThreadContextValue with a value previously obtained from getServletThreadContextToRestore(). |
static void |
serviceWithoutIncludeAttributes(javax.servlet.Servlet pServlet,
DynamoHttpServletRequest pRequest,
javax.servlet.ServletResponse pResponse,
boolean pIsDynamoResponseAndServlet)
Invoke service ont he specified servlet without any include attributes... |
static void |
setCreateHttpOnlyCookies(boolean pCreateHttpOnlyCookies)
Sets property createHttpOnlyCookies. |
static DynamoHttpServletRequest |
setCurrentRequest(DynamoHttpServletRequest pRequest)
Sets the current response object associated with this request. |
static DynamoHttpServletResponse |
setCurrentResponse(DynamoHttpServletResponse pResponse)
Sets the current response object associated with this request. |
static RepositoryItem |
setCurrentUserProfile(RepositoryItem pItem)
Sets the current user profile |
static void |
setDateFormat(DynamoHttpServletRequest pRequest,
java.lang.String pSsiFormatStr)
Sets the pagecompile date format attribute on the request. |
static void |
setDynamicContentHeaders(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method calls setNoCacheHeaders on pResponse if it determines that pRequest comes from a proxy server, or a user-agent that is known to be a bad-cacher (i.e. |
static void |
setEndRequestThreadPriority()
Called at the end of the request. |
static void |
setInitProperties(javax.servlet.Servlet pServlet,
javax.servlet.ServletConfig pConfig,
NameResolver pContext)
|
static void |
setIsDynamoAppserver(boolean pDynamoAppServer)
Deprecated. |
static void |
setIsJBoss5(boolean pIsJboss5)
|
static void |
setJBoss5PageCompileClasspath(javax.servlet.ServletContext sc,
atg.applauncher.AppLauncher pLauncher)
Set JBoss5 page compile class path |
static void |
setNoCacheHeaders(DynamoHttpServletResponse pResponse)
This method sets the HTTP headers Pragma: no-cache, and Expires: |
static void |
setNoCacheHeaders(javax.servlet.http.HttpServletResponse pResponse)
This method sets the HTTP headers Pragma: no-cache, and Expires: |
static void |
setParentSessionIdAttribute(javax.servlet.http.HttpSession pSession,
java.lang.String pParentSessionId)
Set the parent session id attribute to hold the specified parent session id. |
static void |
setParentSessionIdRequestAttribute(javax.servlet.http.HttpServletRequest pRequest,
java.lang.String pParentSessionId)
Set the parent session id request attribute to hold the specified parent session id. |
static boolean |
setPropertyValue(DynamoHttpServletRequest pReq,
DynamoHttpServletResponse pRes,
java.lang.String pPropertyPath,
java.lang.Object pValue)
This method sets the property value specified by the pPropertyPath parameter to the value specified by the pValue parameter. |
static boolean |
setPropertyValue(javax.servlet.ServletRequest pReq,
javax.servlet.ServletResponse pRes,
java.lang.String pPropertyPath,
java.lang.Object pValue)
This method sets the property value specified by the pPropertyPath parameter to the value specified by the pValue parameter. |
static javax.servlet.http.HttpServletRequest |
setSessionConfNumCacheRequest(javax.servlet.http.HttpServletRequest pSessionConfNumCacheRequest)
set SessionConfNumCacheRequest |
static void |
setStartRequestThreadPriority()
Attempts to keep request handling thread priority higher while it's actually serving a page. |
static void |
setUseExternalTransactionManager(boolean pUseExternalTransactionManager)
Sets the flag to indicate if we are to use the external app servers transaction manager to avoid starting dynamo's transaction manager |
static void |
setUserTransactionURL(java.lang.String pURL)
Sets the JNDI URL for use in retrieving the UserTransaction object. |
static java.lang.String |
toString(boolean b)
|
static java.lang.String |
toString(char c)
|
static java.lang.String |
toString(char[] data)
|
static java.lang.String |
toString(double d)
|
static java.lang.String |
toString(float f)
|
static java.lang.String |
toString(int i)
|
static java.lang.String |
toString(long l)
|
static java.lang.String |
toString(java.lang.Object obj)
Returns the specified value as a string like String.valueOf, except if the value is null, an empty string is returned instead. |
static void |
updateRequestResponse(javax.servlet.ServletRequest pRequest,
javax.servlet.ServletResponse pResponse)
Makes sure that the underlying request/response of the current dynamo request/response matches that of the current request. |
static java.lang.Object |
valuesForMultiValuedHeader(java.lang.String pHeaderName,
java.lang.String pHeaderValue,
java.util.Vector pDest)
|
static boolean |
valuesMatch(java.lang.Object pValue1,
java.lang.Object pValue2)
This returns true if the first argument matches the second argument. |
static boolean |
valuesMatchIgnoreCase(java.lang.Object pValue1,
java.lang.Object pValue2)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public static java.lang.String JNDI_PATH_REQUEST
public static java.lang.String JNDI_PATH_RESPONSE
public static java.lang.String JNDI_PATH_PROFILE
public static ParameterName IMPORTS_NAME
public static ParameterName FORM_NAME
public static final ParameterName LOCALE_PARAM
public static final java.lang.String NO_FLUSH_RESPONSE_CONTEXT_ATTR
public static final java.lang.String USE_XML_PARAM_DELIMITER
public static final java.lang.String DEFAULT_CHARACTER_ENCODING
public static boolean sDynamoAppServer
public static boolean sDynamoAppServerSet
public static atg.servlet.JobRegistry sJobRegistry
public static java.lang.String JOB_REGISTRY_PATH
public static java.lang.String GENERIC_SESSION_MANAGER_PATH
public static java.lang.String APPSERVER_CONFIG_NUCLEUS_PATH
public static java.lang.String DYNAMO_SESSION_MANAGER_PATH
public static java.lang.String DYNAMO_INITIAL_CONTEXT_POOL_PATH
public static java.lang.String SESSION_NAME_CONTEXT_NAME
public static java.lang.String SESSION_RESTORED_MARKER
public static java.lang.String SESSION_NEEDS_RESTORE
public static final java.lang.String PRE_FORWARD_URI_ATTR
public static final java.lang.String PRE_FORWARD_URI_WITH_QUERY_STRING_ATTR
public static final java.lang.String POST_FORWARD_URI_ATTR
public static final java.lang.String PRE_FORWARD_CONTEXT_PATH_ATTR
public static final java.lang.String IBM_MANAGED_SERVER_CLASS
public static final java.lang.String APPSERVER_NAME
public static java.lang.String POST_REQUEST_PROCESSORS_NAME
public static java.lang.String POST_REQUEST_JOB_IDS
public static java.lang.String POST_REQUEST_PROCESSOR_OWNER
public static java.lang.String CONTEXT_PATHS
public static java.lang.String PAGE_FILTER_CHAIN_ATTRIBUTE
public static final java.lang.String PAGE_FILTER_ENABLED
public static final java.lang.String DROPLET_EVENT_SERVLET_NAME
public static final java.lang.String DAF_DROPLET_EVENT_SERVLET_NAME
public static final java.lang.String WINDOW_SESSION_NAME
public static final java.lang.String HOST_SERVLET_CONTEXT_ATTR
@Deprecated public static boolean mLoggingDebug
@Deprecated public static boolean mLoggingError
public static javax.naming.InitialContext sWorkingInitialContext
Constructor Detail |
---|
public ServletUtil()
Method Detail |
---|
public static void setCreateHttpOnlyCookies(boolean pCreateHttpOnlyCookies)
public static boolean isCreateHttpOnlyCookies()
public static java.lang.Object lookupInInitialContext(java.lang.String pName) throws javax.naming.NamingException
javax.naming.NamingException
public static java.lang.String getWebsphereServerName()
public static java.lang.String getJspClasspath(javax.servlet.ServletContext pContext)
public static java.lang.String getWeblogicJspClasspath() throws java.lang.NoSuchMethodException, java.lang.SecurityException, java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.SecurityException
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
public static java.lang.String getWebSphereJspClasspath() throws java.lang.NoSuchMethodException, java.lang.SecurityException, java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.SecurityException
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
public static java.lang.String getJBossJspClasspath() throws java.lang.ClassNotFoundException, java.lang.NoSuchFieldException, java.lang.NoSuchMethodException, java.lang.SecurityException, java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
java.lang.NoSuchFieldException
java.lang.NoSuchMethodException
java.lang.SecurityException
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.InstantiationException
java.lang.reflect.InvocationTargetException
public static java.lang.String getJBossJspClasspath(javax.servlet.ServletContext sc) throws java.lang.IllegalStateException, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.NoSuchFieldException, java.lang.SecurityException, java.lang.IllegalArgumentException
sc
-
java.lang.IllegalStateException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.NoSuchFieldException
java.lang.SecurityException
java.lang.IllegalArgumentException
public static java.lang.String getJBoss5JspClasspath(javax.servlet.ServletContext sc) throws java.lang.IllegalStateException, java.lang.IllegalAccessException, java.lang.NoSuchFieldException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException
sc
- servlet context
java.lang.IllegalStateException
java.lang.IllegalAccessException
java.lang.NoSuchFieldException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
public static java.lang.String getJBoss5PageCompileClasspath()
public static void setJBoss5PageCompileClasspath(javax.servlet.ServletContext sc, atg.applauncher.AppLauncher pLauncher) throws java.lang.IllegalStateException, java.lang.IllegalAccessException, java.lang.NoSuchFieldException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException
sc
- servlet contextpLauncher
- AppLauncher
java.lang.IllegalStateException
java.lang.IllegalAccessException
java.lang.NoSuchFieldException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
public static java.lang.String[] getCleanClassPathArrayWithLocallib(atg.applauncher.AppLauncher pLauncher)
pLauncher
- AppLauncher
public static void flushBeforeInclude(javax.servlet.jsp.JspWriter pOut) throws java.io.IOException
java.io.IOException
public static void flushBeforeInclude(DynamoHttpServletResponse pRes) throws java.io.IOException
pRes
- The response to attempt to flush before including
(at least on WebSphere).
java.io.IOException
public static atg.servlet.sessiontracking.DynamoSessionManager getSessionManager()
public static NameContext getSessionNameContext(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpSession pSession, Nucleus pNucleus)
@Deprecated public static void invalidateSessionNameContext(javax.servlet.http.HttpSession pSession)
Note: this version of this method has been deprecated. Please use the request-based version to avoid a potential deadlock during session replication.
pSession
- the current HttpSession@Deprecated public static void invalidateSessionNameContext(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpSession pSession)
Note: This method has been deprecated, use invalidateSessionsAndSessionNameContexts instead.
pRequest
- the current HttpServletRequestpSession
- the current HttpSessionpublic static void invalidateSessionsAndSessionNameContexts(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpSession pSession, boolean pInvalidateAllChildren)
public static java.lang.String getParentSessionId(javax.servlet.http.HttpServletRequest pRequest)
pRequest
- the request from which to get the session ID.
@Deprecated public static void invalidateSession(javax.servlet.http.HttpSession pSession)
Note: this version is deprecated in favor of the version that takes a request.
public static void invalidateSession(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpSession pSession)
Note:This method has been deprecated, use invalidateSessionsAndSessionNameContexts instead.
pRequest
- a request in the session to be invalidated
(may be null, but a null value opens the possibilty of deadlock
when using asynchronous session replication).pSession
- the session to be invalidated.public static void setInitProperties(javax.servlet.Servlet pServlet, javax.servlet.ServletConfig pConfig, NameResolver pContext) throws BadValueException
BadValueException
public static java.lang.Object convertPropertyValue(java.lang.String pValue, java.lang.Class pClass, NameResolver pContext) throws ServiceException
ServiceException
- if there was a problem with the operationpublic static java.lang.Object doPropertySetAsText(java.lang.Class pClass, java.lang.String pValue) throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- if there was a problem with the operationpublic static javax.servlet.Servlet loadServlet(DynamoHttpServletRequest pRequest, java.lang.String pName, java.lang.String pCode, java.lang.String pCodeBase, java.util.Properties pArgs) throws javax.servlet.ServletException
javax.servlet.ServletException
- if an error occurred during the operationpublic static void callServlet(javax.servlet.Servlet pServlet, java.lang.String pName, javax.servlet.ServletRequest pReq, javax.servlet.ServletResponse pRes) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
public static boolean isUsingURLRewriting(javax.servlet.http.HttpServletRequest pRequest)
public static void embed(java.lang.String pPath, javax.servlet.Servlet pServlet, DynamoHttpServletRequest request, javax.servlet.ServletResponse response) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
public static void embed(java.lang.String pPath, DynamoHttpServletRequest request, javax.servlet.ServletResponse response) throws javax.servlet.ServletException, java.io.IOException
For this method to work, there must be a PageCompileServlet in the pipeline ahead of the caller of this method.
pPath
- the relative URI from the current file, or an absolute
URI (not a full URL with http://).request
- the request to embed this file intoresponse
- the response to embed this file into
javax.servlet.ServletException
java.io.IOException
public static void serviceWithoutIncludeAttributes(javax.servlet.Servlet pServlet, DynamoHttpServletRequest pRequest, javax.servlet.ServletResponse pResponse, boolean pIsDynamoResponseAndServlet) throws java.io.IOException, javax.servlet.ServletException
java.io.IOException
javax.servlet.ServletException
protected static void clearIncludeAttributes(javax.servlet.http.HttpServletRequest pRequest)
public static atg.servlet.RequestStateRestorer recordAndClearIncludeAttributes(javax.servlet.http.HttpServletRequest pRequest)
public static void execCgi(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.lang.String pPath, boolean pIsCgi) throws java.io.IOException, javax.servlet.ServletException
java.io.IOException
javax.servlet.ServletException
public static java.lang.String fileLastMod(DynamoHttpServletRequest pRequest, java.lang.String pDocPath)
public static java.lang.String fileSize(DynamoHttpServletRequest pRequest, java.lang.String pDocPath)
public static java.lang.String formattedDate(DynamoHttpServletRequest pRequest, long pTimeMillis, java.util.TimeZone pTimeZone)
public static void setDateFormat(DynamoHttpServletRequest pRequest, java.lang.String pSsiFormatStr)
public static java.util.Locale getUserLocale(DynamoHttpServletRequest pRequest, boolean pUseRequestLocale)
The method first calls getNonDefaultUserLocale(DynamoHttpServletRequest, boolean)
to determine the non default user locale.
if the locale cannot be determined, then the default server locale is used.
pRequest
- The Dynamo servlet request from which to derive the locale.pUseRequestLocale
- Flag indicating whether to consult pRequest's requestLocale
setting when choosing a locale.
getNonDefaultUserLocale(DynamoHttpServletRequest, boolean)
public static java.util.Locale getNonDefaultUserLocale(DynamoHttpServletRequest pRequest, boolean pUseRequestLocale)
The method first searches for a request parameter named
locale
. This value can be either a java.util.Locale
object or a String that represents the locale.
If there is no such request parameter, and if
pUseRequestLocale
parameter is true, then the locale of
the request will be returned if one has been set.
pRequest
- The Dynamo servlet request from which to derive the locale.pUseRequestLocale
- Flag indicating whether to consult pRequest's requestLocale
setting when choosing a locale.
public static java.util.Locale getUserLocale(DynamoHttpServletRequest pRequest)
locale
, then checking the request
itself for a locale setting, and finally returning the default server
locale if all else fails.
pRequest
- The Dynamo servlet request from which to derive the locale.
public static java.util.Locale getUserLocale()
locale
, then checking the request
itself for a locale setting, and finally returning the default server
locale if all else fails.
public static java.lang.String resolvePathFromRelativeURL(java.lang.String pRelativeURL, java.lang.String pFilePath) throws java.lang.IllegalArgumentException
pPath
- The pure relative path (i.e. does not start with "/") to be
resolved.pWorkingDirectory
- The working directory to resolve against, which
should begin and end with the "/" character.
java.lang.IllegalArgumentException
public static java.lang.String toString(java.lang.Object obj)
public static java.lang.String toString(char[] data)
public static java.lang.String toString(boolean b)
public static java.lang.String toString(char c)
public static java.lang.String toString(int i)
public static java.lang.String toString(long l)
public static java.lang.String toString(float f)
public static java.lang.String toString(double d)
public static java.lang.String escapeHtmlString(java.lang.String pStr)
The characters &, <, >, and " are all converted to &&, &<, &>, and &" respectively.
pStr
- the string to be escaped
public static java.lang.String escapeHtmlString(java.lang.String pStr, boolean pEscapeAmp)
The characters &, <, >, and " are all converted to &&, &<, &>, and &" respectively.
pStr
- the string to be escapedpEscapeAmp
- whether to escape ampersand
public static java.lang.String getStackTrace(java.lang.Throwable pThrowable)
Throwable.printStrackTrace(PrintStream)
method directly. This allows you to get a String representation
of the stack trace so it can be printed
public static void printStackTrace(java.lang.Throwable pThrowable, javax.servlet.ServletOutputStream pOut)
Throwable.printStrackTrace(PrintStream)
method directly. This provides a convenient method to print
stack traces.
public static void setNoCacheHeaders(DynamoHttpServletResponse pResponse)
public static void setNoCacheHeaders(javax.servlet.http.HttpServletResponse pResponse)
public static void setDynamicContentHeaders(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
public static java.util.Dictionary convertStringToDictionary(DynamoHttpServletRequest pRequest, java.lang.String pValue) throws javax.servlet.ServletException
name1=strValue1, name2=param:paramValue2, name3=bean:propertyValue3this method returns a Dictionary that contains the resolved values.
javax.servlet.ServletException
- if one of the referenced property values is
invalid.public static java.lang.String resolveTranslatedPathFromURI(java.lang.String pPath, DynamoHttpServletRequest pRequest)
pPath
- a URIpRequest
- the request to resolve against.public static boolean valuesMatch(java.lang.Object pValue1, java.lang.Object pValue2)
valuesMatchIgnoreCase(Object, Object)
public static boolean valuesMatchIgnoreCase(java.lang.Object pValue1, java.lang.Object pValue2)
public static java.lang.Object getPropertyValue(javax.servlet.ServletRequest pRequest, java.lang.String pPropertyPath) throws javax.servlet.ServletException
pPropertyPath
- the path name to the property in the form:
{component path}.{property}.{property}
javax.servlet.ServletException
- thrown if an error occurs trying to
find the component, or trying to get one of the property
values.public static java.lang.Object getPropertyValue(DynamoHttpServletRequest pRequest, java.lang.String pPropertyPath) throws javax.servlet.ServletException
pPropertyPath
- the path name to the property in the form:
{component path}.{property}.{property}
javax.servlet.ServletException
- thrown if an error occurs trying to
find the component, or trying to get one of the property
values.public static boolean setPropertyValue(javax.servlet.ServletRequest pReq, javax.servlet.ServletResponse pRes, java.lang.String pPropertyPath, java.lang.Object pValue) throws javax.servlet.ServletException, java.io.IOException
If this method is called from within a jhtml page with a relative path of a component, the imports in the page are used to expand the property name.
pReq
- the request which is used to both resolve the comopent
and to pass to the handleX method .pRes
- the response which is passed to handleX methodpPropertyPath
- the path name to the property in the form:
{component path}.{property}.{property}
pValue
- the value of the property. Data type conversion
is performed to convert String values into values of the appropriate
type for the property.
javax.servlet.ServletException
- thrown if an error occurs trying to
find the component, or trying to get one of the intermediate property
values, or trying to set the final property value. A ServletException
can also be thrown by one of the handleX methods, in which case
that exception is propagated up through this call.
java.io.IOException
- thrown if the handleX methods throws an
IOExceptionpublic static boolean setPropertyValue(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes, java.lang.String pPropertyPath, java.lang.Object pValue) throws javax.servlet.ServletException, java.io.IOException
If this method is called from within a jhtml page with a relative path of a component, the imports in the page are used to expand the property name.
pReq
- the request which is used to both resolve the comopent
and to pass to the handleX method .pRes
- the response which is passed to handleX methodpPropertyPath
- the path name to the property in the form:
{component path}.{property}.{property}
pValue
- the value of the property. Data type conversion
is performed to convert String values into values of the appropriate
type for the property.
javax.servlet.ServletException
- thrown if an error occurs trying to
find the component, or trying to get one of the intermediate property
values, or trying to set the final property value. A ServletException
can also be thrown by one of the handleX methods, in which case
that exception is propagated up through this call.
java.io.IOException
- thrown if the handleX methods throws an
IOExceptionpublic static java.lang.String getRequestURI(javax.servlet.ServletRequest pReq)
pReq
- the request
public static java.lang.String escapeURLString(java.lang.String pStr)
pStr
- the String to be translated.
public static java.lang.String getNewBaseDirectory(DynamoHttpServletRequest pRequest, javax.servlet.ServletContext pServletContext, java.lang.String pNewURI)
public static atg.servlet.pagecompile.taglib.TagManager getTagManager(DynamoHttpServletRequest pRequest, java.lang.String pTagLibURI, java.lang.String pResovledTagLibURI, java.lang.String pTagName, int pLineNumber) throws javax.servlet.ServletException
pLineNumber
- the line number of the taglib reference.
javax.servlet.ServletException
public static atg.servlet.pagecompile.taglib.TagManager getTagManager(DynamoHttpServletRequest pRequest, java.lang.String pTagLibURI, java.lang.String pTagName, int pLineNumber) throws javax.servlet.ServletException
pLineNumber
- the line number of the taglib reference.
javax.servlet.ServletException
public static java.lang.String getCurrentRequestURI(javax.servlet.http.HttpServletRequest pRequest)
pRequest
- the request to get the URI ofpublic static java.lang.String getCurrentContextPath(javax.servlet.http.HttpServletRequest pRequest)
pRequest
- the request to get the context path ofpublic static java.lang.String getCurrentContextPath(javax.servlet.http.HttpServletRequest pRequest, boolean pInInclude)
pRequest
- the request to get the context path ofpInInclude
- whether we are currently in an RequestDispatcher.include()public static javax.servlet.ServletContext getCurrentServletContext(javax.servlet.http.HttpServletRequest pRequest)
public static java.lang.String getCurrentServletContextName(javax.servlet.http.HttpServletRequest pRequest)
public static java.lang.String getCurrentServletPath(javax.servlet.http.HttpServletRequest pRequest)
pRequest
- the request to get the servlet path ofpublic static java.lang.String getCurrentServletPath(javax.servlet.http.HttpServletRequest pRequest, boolean pInInclude)
pRequest
- the request to get the servlet path ofpInInclude
- whether we are currently in an RequestDispatcher.include()public static java.lang.String getCurrentPathInfo(javax.servlet.http.HttpServletRequest pRequest)
pRequest
- the request to get the path info ofpublic static java.lang.String getCurrentPathInfo(javax.servlet.http.HttpServletRequest pRequest, boolean pInInclude)
pRequest
- the request to get the path info ofpInInclude
- whether we are currently in an RequestDispatcher.include()public static java.lang.String getCurrentQueryString(javax.servlet.http.HttpServletRequest pRequest)
pRequest
- the request to get the query string ofpublic static java.lang.String getCurrentQueryString(javax.servlet.http.HttpServletRequest pRequest, boolean pInInclude)
pRequest
- the request to get the query string ofpInInclude
- whether we are currently in an RequestDispatcher.include()public static java.lang.String getCurrentPathTranslated(javax.servlet.http.HttpServletRequest pRequest)
pRequest
- the request to get the path translated value frompublic static java.lang.String getLiteralCurrentPathTranslated(javax.servlet.http.HttpServletRequest pRequest, boolean pInInclude)
pRequest
- the request to get the path translated value frompInInclude
- whether we are currently in an RequestDispatcher.include()public static java.lang.String getCurrentPathTranslated(javax.servlet.http.HttpServletRequest pRequest, boolean pInInclude)
pRequest
- the request to get the path translated value frompInInclude
- whether we are currently in an RequestDispatcher.include()public static java.lang.String getRequestURI(javax.servlet.http.HttpServletRequest pRequest, java.lang.String pURL)
pURL
- the url to get the requestURI frompublic static java.lang.String getRequestURI(javax.servlet.http.HttpServletRequest pRequest, java.lang.String pURL, boolean pStripQueryParams)
pURL
- the url to get the requestURI frompStripQueryParams
- if true, query params will be stripped offpublic static java.lang.String getRequestURI(DynamoHttpServletRequest pRequest, java.lang.String pURL)
pURL
- the url to get the requestURI frompublic static java.lang.String getRequestURI(DynamoHttpServletRequest pRequest, java.lang.String pURL, boolean pStripQueryParams)
pURL
- the url to get the requestURI frompStripQueryParams
- if true, query params will be stripped offpublic static java.lang.String getRequestURL(javax.servlet.http.HttpServletRequest pRequest, java.lang.String pURI)
public static DynamoHttpServletRequest getCurrentRequest()
public static javax.servlet.http.HttpSession getGlobalSession(boolean create)
create
- whether to create a session if none exists.public static DynamoHttpServletRequest setCurrentRequest(DynamoHttpServletRequest pRequest)
public static void reportLeakedCurrentRequest()
public static DynamoHttpServletResponse getCurrentResponse()
public static DynamoHttpServletResponse setCurrentResponse(DynamoHttpServletResponse pResponse)
public static RepositoryItem getCurrentUserProfile()
public static RepositoryItem setCurrentUserProfile(RepositoryItem pItem)
public static javax.servlet.http.HttpServletRequest setSessionConfNumCacheRequest(javax.servlet.http.HttpServletRequest pSessionConfNumCacheRequest)
pSessionConfNumCacheRequest
- the SessionConfNumCacheRequestpublic static javax.servlet.http.HttpServletRequest getSessionConfNumCacheRequest()
public static atg.servlet.ServletThreadContext getServletThreadContextToRestore()
public static void restoreServletThreadContext(atg.servlet.ServletThreadContext pRestore)
public static void setStartRequestThreadPriority()
public static void setEndRequestThreadPriority()
public static DynamoHttpServletResponse getDynamoResponse(javax.servlet.ServletRequest pRequest, javax.servlet.ServletResponse pResponse)
public static DynamoHttpServletRequest getDynamoRequest(javax.servlet.ServletContext pContext, javax.servlet.ServletRequest pRequest, javax.servlet.ServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
java.io.IOException
javax.servlet.ServletException
public static void updateRequestResponse(javax.servlet.ServletRequest pRequest, javax.servlet.ServletResponse pResponse)
This method modifies the Dynamo response
found in the request attribute
DynamoHttpServletRequest.ATTRIBUTE_NAME
public static DynamoHttpServletRequest getDynamoRequest(javax.servlet.ServletRequest pRequest)
public static void addPostRequestProcessor(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, atg.servlet.PostRequestProcessor pProcessor, java.lang.String pOwnerName) throws javax.servlet.ServletException, java.io.IOException
pOwnerName
- The nucleus path of the servlet that is calling this method
is adding the post request processor. This id is used to determine
if there was an attempt to add a processor twice for the same servlet
in the same request.
javax.servlet.ServletException
java.io.IOException
public static void processPostRequestProcessors(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
public static java.lang.String getRequestURIFromPathInfo(javax.servlet.http.HttpServletRequest pRequest, java.lang.String pPath)
public static java.lang.String convertToNativeString(java.lang.String pValue, java.lang.String pEncoding)
public static boolean isDynamoJ2EEServer()
public static java.lang.String getContentCharset(java.lang.String mimeType)
public static java.lang.String getContentCharset(java.lang.String mimeType, java.lang.String pDefault)
mimeType ::= type "/" subtype [ ";" attribute "=" value]* ; attribute ::= case insensitive token ; value ::= token | quoted-string ; token ::= any us-ascii character except space, ctls, or 'tspecials' where 'tspecials' are ()<>@ [],:; /\?="
Annoyingly enough, comments are allowed ... so
text/html; charset="utf-8" (packed UNICODE)is legal.
mimeType
- an RFC 2045 style MIME type stringpublic static boolean isPageFilterEnabled(DynamoHttpServletRequest pRequest)
public static void setIsDynamoAppserver(boolean pDynamoAppServer)
atg.service.dynamo.AppServerConfig.setDynamo()
public static atg.service.dynamo.AppServerConfig getAppServerConfig()
public static boolean isWebLogic()
public static boolean isGenericJ2EEServer()
public static boolean isJBoss()
public static void setIsJBoss5(boolean pIsJboss5)
public static boolean isJBoss5()
public static boolean isWebSphere()
public static boolean inInclude(javax.servlet.ServletRequest pRequest)
public static javax.servlet.RequestDispatcher getLocalRequestDispatcher(javax.servlet.http.HttpServletRequest pRequest, java.lang.String pPath)
pRequest
- the request from which the request dispatcher
will be obtained (also used for calculating
the current location for relative paths).pPath
- The path within the current web-app to which
to dispatch.public static javax.servlet.RequestDispatcher getRequestDispatcher(javax.servlet.http.HttpServletRequest pRequest, java.lang.String pContextPath, java.lang.String pPath)
pRequest
- the request from which the request dispatcher
will be obtained (also used for calculating
the current location for relative paths).pContextPath
- the context root of the web application to
be dispatched into. Null means use the
current web-app.pPath
- The path within the specified web-app to which
to dispatch
public static void invokeInclude(javax.servlet.RequestDispatcher pDispatcher, javax.servlet.ServletRequest pRequest, javax.servlet.ServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
pDispatcher
- the request display whose include method
should be invoked.pRequest
- the request to pass into RequestDispatcher.include()pResponse
- the respose to pass into RequestDispatcher.include()
java.io.IOException
javax.servlet.ServletException
public static void invokeNoFlushInclude(javax.servlet.RequestDispatcher pDispatcher, javax.servlet.ServletRequest pRequest, javax.servlet.ServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
java.io.IOException
javax.servlet.ServletException
public static java.lang.String makeURIAbsoluteURL(java.lang.String pLocation, DynamoHttpServletRequest pRequest)
public static java.lang.String makeURIAbsoluteURL(java.lang.String pLocation, javax.servlet.http.HttpServletRequest pRequest, int pEncodeContextPathMode, boolean pEncodeServletPath)
pLocation
- the location... possibly a relative URIpRequest
- the requestpEncodeContextPathMode
- the mode that determines whether
we could prepend the context path.pEncodeServletPath
- whether to encode the servelt path.public static java.lang.String prependSchemeAndHost(javax.servlet.http.HttpServletRequest pRequest, java.lang.String pURI)
pRequest
- the request from which to obtain scheme
serverName, and serverPort.pURI
- the to append to the result (should begin
with a slash).public static java.lang.String prependSchemeAndHost(java.lang.String pScheme, java.lang.String pHost, int pPort, java.lang.String pURI)
pScheme
- the scheme to prepend (typically "http" or "https")pHost
- the name of the host to prependpPort
- the port to prepend (if isn't the default for the scheme)pURI
- the URI to append to the result.public static java.lang.String makeURIAbsolute(java.lang.String pLocation, DynamoHttpServletRequest pRequest)
public static java.lang.String makeURIAbsolute(java.lang.String pLocation, javax.servlet.http.HttpServletRequest pRequest, int pEncodeContextPathMode, boolean pEncodeServletPath)
public static java.lang.String getHostHeader(javax.servlet.http.HttpServletRequest pRequest)
public static java.lang.String processRedirectURL(java.lang.String pPath, DynamoHttpServletRequest pRequest, boolean pEncodeSessionId)
public static boolean isEquivalentCharset(java.lang.String pOldCharset, java.lang.String pNewCharset)
public static boolean checkIsSingleByteEncoding(java.lang.String pEncoding)
checkIsSingleByteEncodingIgnoringCase
public static boolean checkIsSingleByteEncodingIgnoringCase(java.lang.String pEncoding)
public static boolean checkIsValidCharacterEncoding(java.lang.String pEncoding)
Since Sun appears not to provide a registry or programmatic method of listing valid encodings we resort to trying to create a reader with the provided encoding and recording the results in a hashtable. Ick.
public static java.lang.Object valuesForMultiValuedHeader(java.lang.String pHeaderName, java.lang.String pHeaderValue, java.util.Vector pDest)
public static void setUserTransactionURL(java.lang.String pURL)
public static java.lang.String getUserTransactionURL()
public static void setUseExternalTransactionManager(boolean pUseExternalTransactionManager)
public static boolean getUseExternalTransactionManager()
public static javax.transaction.UserTransaction getUserTransaction()
public static java.lang.String getParamDelimiter(DynamoHttpServletRequest pReq)
public static void handleJspTagIOException(java.io.IOException pException) throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
public static void handleJspTagIOException(java.lang.String pMessage, java.io.IOException pException) throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
public javax.servlet.jsp.tagext.Tag checkOutTag(atg.servlet.pagecompile.taglib.TagManager pTagManager, atg.servlet.pagecompile.taglib.TagWrapper[] pWrappers, int pIndex, java.lang.String pAttSet) throws java.lang.IllegalAccessException, java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.InstantiationException
public static javax.servlet.jsp.tagext.Tag checkOutInitTag(atg.servlet.pagecompile.taglib.TagManager pTagManager, atg.servlet.pagecompile.taglib.TagWrapper[] pWrappers, int pIndex, java.lang.String pAttSet, javax.servlet.jsp.PageContext pPageContext, javax.servlet.jsp.tagext.Tag pParentTag) throws java.lang.IllegalAccessException, java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.InstantiationException
public static javax.servlet.jsp.tagext.Tag initTag(javax.servlet.jsp.tagext.Tag pTag, javax.servlet.jsp.tagext.Tag[] pTags, int pIndex, javax.servlet.jsp.PageContext pPageContext, javax.servlet.jsp.tagext.Tag pParentTag) throws java.lang.IllegalAccessException, java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.InstantiationException
public static void checkInTag(atg.servlet.pagecompile.taglib.TagWrapper[] pWrappers, int pIndex)
public static void releaseTag(javax.servlet.jsp.tagext.Tag[] pTags, int pIndex)
public static java.lang.Throwable cleanUpTags(atg.servlet.pagecompile.taglib.TagWrapper[] pWrappers)
pWrappers
- The array of checked-out but not yet checked-in
TagWrappers.public static java.lang.Throwable cleanUpTags(javax.servlet.jsp.tagext.Tag[] pTags)
pWrappers
- The array of checked-out but not yet checked-in
Tags.public static javax.servlet.jsp.JspWriter pushBody(javax.servlet.jsp.PageContext pPageContext, boolean[] pBodyContentsPushed, int pIndex)
public static javax.servlet.jsp.JspWriter popBody(javax.servlet.jsp.PageContext pPageContext, boolean[] pBodyContentsPushed, int pIndex)
public static javax.servlet.jsp.JspWriter popBodyContents(javax.servlet.jsp.PageContext pPageContext, javax.servlet.jsp.JspWriter pOut, boolean[] pBodyContentsPushed)
public static javax.servlet.jsp.JspWriter popBodyContents(javax.servlet.jsp.PageContext pPageContext, javax.servlet.jsp.JspWriter pOut, boolean[] pBodyContentsPushed, int pFromIndex, int pToIndex)
public static DropletEventServlet getDropletEventServlet() throws javax.servlet.ServletException
javax.servlet.ServletException
public static atg.nucleus.WindowScopeSession getWindowSession()
public static void setParentSessionIdRequestAttribute(javax.servlet.http.HttpServletRequest pRequest, java.lang.String pParentSessionId)
pRequest
- the request in which to store the parent session
ID.pParentSessionId
- the parent session id to set.public static void setParentSessionIdAttribute(javax.servlet.http.HttpSession pSession, java.lang.String pParentSessionId)
pSession
- the session in which to store the parent session
ID.pParentSessionId
- the parent session id to set.public static java.lang.String getParentSessionIdFromRequestAttribute(javax.servlet.http.HttpServletRequest pRequest)
pRequest
- the request from which we attempt
to get the parent session id
public static java.lang.String getParentSessionIdFromAttribute(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpSession pSession)
pRequest
- the request from which to first attempt
to get the parent session id (ignored if null)pSession
- the session from which to get the parent
session id.
public static java.lang.String getParentSessionIdFromAttribute(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpSession pSession, boolean pCopyToRequest)
pRequest
- the request from which to first attempt
to get the parent session id (ignored if null)pSession
- the session from which to get the parent
session id (ignored if null).pCopyToRequest
- copy the parent session id to the request,
if not already on the request, and present on the session.
public static java.lang.String getParentSessionIdFromAttribute(javax.servlet.http.HttpSession pSession)
public static atg.servlet.ExtendedAttributesCookie.ExtendedAttributesCookieImpl createCookie(java.lang.String pName, java.lang.String pValue)
pName
- the name of the cookie.pValue
- the value for the cookie.public static atg.servlet.ServletUtilService getService()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |