Sebastian, the short answer is to set the object as a request attribute.
You would do something like the following in your action:
public ActionForward execute(...) { Foo myFoo = FooService.getFoo(); request.setAttribute("myFoo", foo); return mapping.findForward("success"); }
Then on the success page you can access the object using the bean tags, the logic tags or anything else that searches for scoped variables by name -- you can also use JSTL.
<bean:write name="myFoo"/> <c:out value="${myFoo}"/>
...
HTH Bill Siggelkow
Sebastian Ho wrote:
hi
1. If I need to make an object in a JSP to be available to the next JSP
(which is forwarded by my Action), how do I do that without using an
ActionForm?
The reason I am asking this is that to use an ActionForm I have to write the entities of my ActionForm into the JSP for it to be picked up, which I do not want to do. I just want to make it available to the next JSP.
I do not wish to use an session for this if possible because there's only two JSP.
In JSP, I remember there's a <param> or something else which pass
objects between pages (I might be mistaken here).
2. If I have two actionforms in my JSP, in the same <form>. How do I handle that because execute (in Action class) only have a form parameter.
Thanks guys
Sebastian Ho
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]