On Fri, 13 Apr 2001 [EMAIL PROTECTED] wrote:
>
>
> how about <bean:define...>?
>
> Dave
>
If the bean is stored into the request or session attributes in an Action,
before the controller servlet forwards control to the JSP page, you don't
need to do anything -- it will just be there already. For example, in
your action, assume you said:
UserBean userbean = ... create or look up a user bean ...
HttpSession session = request.getSession(true);
session.setAttribute("mybean", userbean);
Now, when control is forwarded to your page, you can say
<bean:write name="mybean" property="firstName"/>
and Struts will use the session attribute you previously stored. The same
thing works for request attributes, as long as you forward control to the
JSP page while processing the same request.
Craig