Q. Is it possible to maintain the state of a bean for a particular
client for use in a JSP page. I have tried placing the bean instance I
wish to save on the session object in the hopes of later retrieving it
via a get method in the servlet. After reviewing docs I think it may be
possible to do something along the lines of:
SERVLET:
HttpSession session = request.getSession(true);
session.putValue("theBean", myBean);
JSP PAGE:
<jsp:useBean id="theBean" scope="session" class="..." />
Now in the JSP page I wish to retrieve values on the bean instance from
a specified method. So,
JSP PAGE:
<% int x = theBean.getSize(); %>
But when I try this the above fails as it does not know what the
variable "theBean" is, even though I named it in the id portion with the
jsp:useBean tag. Any thoughts? Thanks
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html