|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.http.HttpUtil
Helper class to create informations about the session, request object or the system environment.
Field Summary | |
private static int |
LABEL_LENGTH
LABEL_LENGTH |
Constructor Summary | |
private |
HttpUtil()
Constructor |
Method Summary | |
static java.lang.String |
createContextInfo(javax.servlet.ServletContext context)
Creates information about the servlet context. |
static java.lang.String |
createCookieInfo(javax.servlet.http.HttpServletRequest request)
Creates information about the cookies |
static java.lang.String |
createEnvironmentInfo()
Creates informations about the system environment and the Java VM. |
static java.util.Hashtable |
createParameterTable(javax.servlet.http.HttpServletRequest request)
Returns an enumeration of parameter names |
static java.util.Hashtable |
createParameterTable(javax.servlet.http.HttpServletRequest request,
java.util.Set excludes)
Returns an enumeration of parameter names |
static java.util.Properties |
createProperties(javax.servlet.http.HttpServletRequest request)
Returns an enumeration of parameter names |
static java.util.Properties |
createProperties(javax.servlet.http.HttpServletRequest request,
java.util.Set excludes)
Returns an enumeration of parameter names |
static java.lang.String |
createRequestInfo(javax.servlet.http.HttpServletRequest request,
boolean includeParameters)
Creates information about the request parameter. |
static java.lang.String |
createRequestInfo(javax.servlet.http.HttpServletRequest request,
boolean includeParameters,
java.util.Set excludes)
Creates information about the request parameter. |
static java.lang.String |
createSessionInfo(javax.servlet.http.HttpSession session)
Creates informations about the user session |
static java.lang.String |
createVersionInfo(VersionInfo version)
Creates a Version String |
static java.lang.String |
getAppContextPath(javax.servlet.http.HttpServletRequest request)
Computes the applications full qualified context path |
static java.lang.String |
getJSPVersion()
Returns the version of the JSP specification |
private static java.lang.String |
head(java.lang.String label)
|
static boolean |
isRequestMarked(javax.servlet.http.HttpServletRequest request,
java.lang.String mark)
Checks if a mark is present |
private static java.lang.String |
lbl(java.lang.String label)
|
static java.lang.Object |
lookup(javax.servlet.jsp.PageContext pageContext,
java.lang.String name,
HttpScope scope)
Locate and return the specified bean, from an optionally specified scope, in the specified page context. |
static java.lang.Object |
lookup(javax.servlet.ServletContext servletContext,
javax.servlet.http.HttpServletRequest request,
java.lang.String name,
HttpScope scope)
Locate and return the specified bean, from an optionally specified scope, in the specified page context. |
private static java.lang.Object |
lookupDialog(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
Locate and return the specified bean, from the dialog scope. |
private static java.lang.Object |
lookupDialog(javax.servlet.jsp.PageContext pageContext,
java.lang.String name)
Locate and return the specified bean, from the dialog scope. |
static java.lang.Object |
markRequest(javax.servlet.http.HttpServletRequest request,
java.lang.String mark,
java.lang.Object value)
Marks the request with an named attribute. |
private static java.lang.String |
separator(java.lang.String label)
|
static java.lang.Object |
unmarkRequest(javax.servlet.http.HttpServletRequest request,
java.lang.String mark)
Removes the mark from the request |
static java.lang.String |
urlDecode(java.lang.String encoded)
Performs an URL-Decoding for the given String |
static java.lang.String |
urlEncode(java.lang.Object decoded)
Performs an URL-Encoding for the given String |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final int LABEL_LENGTH
Constructor Detail |
private HttpUtil()
Method Detail |
private static java.lang.String head(java.lang.String label)
private static java.lang.String separator(java.lang.String label)
private static java.lang.String lbl(java.lang.String label)
private static java.lang.Object lookupDialog(javax.servlet.jsp.PageContext pageContext, java.lang.String name)
null
instead.
pageContext
- Page context to be searchedname
- Name of the bean to be retrieved
private static java.lang.Object lookupDialog(javax.servlet.http.HttpServletRequest request, java.lang.String name)
null
instead.
request
- Request context to be searchedname
- Name of the bean to be retrieved
public static java.lang.Object lookup(javax.servlet.jsp.PageContext pageContext, java.lang.String name, HttpScope scope)
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()
instead
public static java.lang.Object lookup(javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletRequest request, java.lang.String name, HttpScope scope)
null
instead.
servletContext
- The servlet context to be searchedrequest
- The request context to be searchedname
- Name of the bean to be retrievedscope
- Scope to be searched (page, request, session, application) or
null
to use findAttribute()
instead
public static java.lang.Object markRequest(javax.servlet.http.HttpServletRequest request, java.lang.String mark, java.lang.Object value)
request
- HttpServletRequestmark
- she name of the markvalue
- an optional value
null
public static java.lang.Object unmarkRequest(javax.servlet.http.HttpServletRequest request, java.lang.String mark)
request
- HttpServletRequestmark
- she name of the mark
null
public static boolean isRequestMarked(javax.servlet.http.HttpServletRequest request, java.lang.String mark)
request
- HttpServletRequestmark
- she name of the mark
true
if the mark is presentpublic static java.lang.String urlEncode(java.lang.Object decoded)
decoded
- String in raw format
public static java.lang.String urlDecode(java.lang.String encoded)
encoded
- URL encoded String
public static java.lang.String getAppContextPath(javax.servlet.http.HttpServletRequest request)
request
- HTTP request
public static java.util.Hashtable createParameterTable(javax.servlet.http.HttpServletRequest request)
request
- HttpServletRequest
public static java.util.Hashtable createParameterTable(javax.servlet.http.HttpServletRequest request, java.util.Set excludes)
request
- HttpServletRequestexcludes
- a set with parameter names that should be excluded from output
public static java.util.Properties createProperties(javax.servlet.http.HttpServletRequest request)
request
- HttpServletRequest
public static java.util.Properties createProperties(javax.servlet.http.HttpServletRequest request, java.util.Set excludes)
request
- HttpServletRequestexcludes
- a set with parameter names that should be excluded from output
public static java.lang.String createSessionInfo(javax.servlet.http.HttpSession session)
session
- HttpSession
public static java.lang.String createRequestInfo(javax.servlet.http.HttpServletRequest request, boolean includeParameters)
request
- HttpServletRequestincludeParameters
- true
to show Parameters
public static java.lang.String createRequestInfo(javax.servlet.http.HttpServletRequest request, boolean includeParameters, java.util.Set excludes)
request
- HttpServletRequestincludeParameters
- true
to show Parametersexcludes
- a set with parameter names that should be excluded from output
public static java.lang.String createCookieInfo(javax.servlet.http.HttpServletRequest request)
request
- HttpServletRequest
public static java.lang.String createContextInfo(javax.servlet.ServletContext context)
context
- ServletContext
public static java.lang.String createEnvironmentInfo()
public static java.lang.String createVersionInfo(VersionInfo version)
version
- Version Information
public static java.lang.String getJSPVersion()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |