No subject
Thu Mar 18 00:20:18 PST 2004
Setting the session attribute:
public void service(HttpServletRequest request, HttpServletResponse
response) {
//...your code
request.getSession().setAttribute("arbitary_attribute_name",
yourObjectInstance);
//...the rest of your code
}
Retrieving your object from the session:
public void service(HttpServletRequest request, HttpServletResponse
response) {
//...your code
YourObject yourObjectInstance =
(YourObject)request.getSession().getAttribute("arbitary_attribute_name");
//...the rest of your code
}
More information about the Opensource
mailing list