I have been trying for a while now to do this but I have
finally decided it is a problem for the experts on this list.
What the situation is, is I have three things, jsp's a big
controlling servlet and a sessioned bean. The plan is to only have getProperty
methods on the JSPs and actually set the data that the page will be using in
the servlet. Therefore I need to be able to access the sessioned bean from the
servlet and the JSP. I know how to send single values, i.e. using the
set/getAttribute methods but not whole beans.
Is this possible?? If so then how,
well i did this by creating a bean, i put all my data
in it and when i call the .jsp page from the servlet i setattribute the
bean as one of the attribute, then in the .jsp page after
<usebean name="errorBean" type="whatever"
LIFESPAN="page">
</usebean>
i wrote
<%
errorBean=(ErrorBean)request.getAttribute("errorBean");
%>
however i don't use this anymore, but could be a
solution, since from that time on you can get from the bean whatever you
need, i used to have 120 different error messages and stuff like
that
AndySoft