|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echoservlet.util.EchoServletSupport
public class EchoServletSupport
Helper class that allows servlet details to become implicit by using ThreadLocal storage for them.
Constructor Summary | |
---|---|
EchoServletSupport()
|
Method Summary | |
---|---|
static Connection |
getConnection()
|
static java.lang.String |
getDirectRemoteHost()
Retrieve the remote IP address. |
static java.lang.String |
getRemoteHost()
Retrieve the remote IP address. |
static javax.servlet.http.HttpServletRequest |
getRequest()
|
static java.lang.Object |
getRequestAttribute(java.lang.String attribute)
Convenience method to get a request attribute |
static java.lang.String |
getRequestHeader(java.lang.String name)
Retrieve a given request header, such as User-Agent to determine the browser type... |
static java.lang.String |
getRequestParameter(java.lang.String parameter)
Convenience method to get to request parameters. |
static java.lang.String[] |
getRequestParameterNames()
Retrieves a list of request parameters. |
static java.lang.String |
getRequestURI()
Retrieve the request URI. |
static javax.servlet.http.HttpServletResponse |
getResponse()
|
static javax.servlet.ServletConfig |
getServletConfig()
|
static javax.servlet.ServletContext |
getServletContext()
|
static javax.servlet.http.HttpSession |
getSession()
|
static java.lang.Object |
getSessionAttribute(java.lang.String attribute)
Convenience method to get session attribute. |
static java.lang.String |
getSessionId()
Wrapper operation for accessing the session in a thread safe fashion. |
static void |
removeSessionAttribute(java.lang.String attribute)
Method to remove a session attribute. |
static void |
setContext(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
static void |
setContext(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
Connection conn)
|
static void |
setRequestAttribute(java.lang.String attribute,
java.lang.Object value)
Convenience method to bind a request attribute |
static void |
setServletConfig(javax.servlet.ServletConfig config)
|
static void |
setServletContext(javax.servlet.ServletContext context)
|
static void |
setSessionAttribute(java.lang.String attribute,
java.lang.Object value)
Method to set a session attribute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EchoServletSupport()
Method Detail |
---|
public static void setContext(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
public static void setContext(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Connection conn)
public static javax.servlet.http.HttpServletRequest getRequest()
public static javax.servlet.http.HttpServletResponse getResponse()
public static Connection getConnection()
public static javax.servlet.http.HttpSession getSession()
public static javax.servlet.ServletContext getServletContext()
public static void setServletContext(javax.servlet.ServletContext context)
public static javax.servlet.ServletConfig getServletConfig()
public static void setServletConfig(javax.servlet.ServletConfig config)
public static java.lang.Object getSessionAttribute(java.lang.String attribute)
attribute
-
public static void setSessionAttribute(java.lang.String attribute, java.lang.Object value)
attribute
- value
- public static void removeSessionAttribute(java.lang.String attribute)
attribute
- value
- public static java.lang.String getRequestParameter(java.lang.String parameter)
parameter
-
public static void setRequestAttribute(java.lang.String attribute, java.lang.Object value)
attribute
- value
- public static java.lang.Object getRequestAttribute(java.lang.String attribute)
attribute
-
public static java.lang.String getRequestURI()
public static java.lang.String getRequestHeader(java.lang.String name)
name
-
public static java.lang.String getRemoteHost()
public static java.lang.String getDirectRemoteHost()
public static java.lang.String getSessionId()
public static java.lang.String[] getRequestParameterNames()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |