You don't need a form but you will have to create your own action...
something like this execute method in it will do the trick:
<jsp A>
<input type="hidden" name="myRequestVal" value="123">
Action Execute method
Public ActionMapping execute(.....) {
String myValue = request.getParameter("myRequestVal");
Request.setAttribute("myRequestVal", myValue);
Return mapping.findForward("success");
}
<jsp B>
I got <%= request.getAttribute("myRequestVal") %>
o.a.s.a.ForwardAction is really designed to be used when you don't have
to perform any logic, and to keep you away from linking directly to a
jsp.
Al
-----Original Message-----
From: Daniel PC Leung [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 07, 2005 10:13 AM
To: Struts Users Mailing List
Subject: How to set attribute in ForwardAction?
I make use ForwardAction to go from page A to page B, just clicking a
link.
e.g.
<action path="/userAccountMaintPath"
type="org.apache.struts.actions.ForwardAction"
parameter="user.userAccountMaint"/>
There are no form in between.
How can I set an attribute in page A so that I can get the attribute
back in page B?
Thank you very much!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]