|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.jsdkapi.GenericSession
Different servlet API's have slightly different methods for putting & getting attributes into the session, so we have a method here for cross-API access to the session, and methods that automatically "wrap" string values stored in the session in SerializableString, so the web-apps can be distributed & session shared by appropriate app servers
| Method Summary | |
static Object |
getAttribute(HttpServletRequest req,
String code)
Retrieve any other object |
static Enumeration |
getAttributeNames(HttpServletRequest req)
Retrieve all attribute names |
static String |
getAttributeString(HttpServletRequest req,
String code)
Return a string stored in the session, unwrapping it from the SerializableString it was stored in |
static String |
getContextPath(HttpServletRequest req)
Retrieve the context path |
static String |
getId(HttpServletRequest req)
Retrieve the session id |
static void |
invalidate(HttpServletRequest req)
Invalidate the session |
static void |
removeAttribute(HttpServletRequest req,
String code)
Remove an attribute from the session |
static void |
setAttribute(HttpServletRequest req,
String code,
Serializable s)
Store any Serializable object in the session |
static void |
setAttribute(HttpServletRequest req,
String code,
String value)
Store a String (wrapped in a SerializableString) in the session |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void setAttribute(HttpServletRequest req,
String code,
String value)
throws ServletException
req - The HttpServletRequest objectcode - the attribute codevalue - the attribute value
ServletException
public static String getAttributeString(HttpServletRequest req,
String code)
throws ServletException
req - the HttpServletRequestcode - the attribute key
ServletException - upon error
public static Object getAttribute(HttpServletRequest req,
String code)
throws ServletException
req - The servlet request objectcode - the attribute key
ServletException - upon error
public static void invalidate(HttpServletRequest req)
throws ServletException
req - the servlet request object
ServletException - upon error
public static void setAttribute(HttpServletRequest req,
String code,
Serializable s)
throws ServletException
req - the ServletRequest objectcode - the attirbute codes - the serializable value to save to the session
ServletException - upon error
public static void removeAttribute(HttpServletRequest req,
String code)
throws ServletException
req - the servletrequest objectcode - the attribute key
ServletException - upon error
public static Enumeration getAttributeNames(HttpServletRequest req)
throws ServletException
req - the servlet request object
ServletException - upon error
public static String getId(HttpServletRequest req)
throws ServletException
req - the servlet request
ServletException - upon error
public static String getContextPath(HttpServletRequest req)
throws ServletException
req - the servlet request object
ServletException - upon error
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||