This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
This should fall into the Really Stupid question section - all the books I have tell you how to manage a series of FORMS in struts. and the examples I see simpley forward to a final success page with geneic success text.
All I want to do is display some values that were gathered on stuts form to the user - like his name and what he registered for. I suspect that a [code]<bean:[code] tag is invloved - but how do i tell the success jsp page which bean - or does just "know"...
On your input form, you tell struts which action to call using a tag like this: <html:form action="/myAction">
In your struts-config file, you tell struts which form bean to populate like this: <form-bean name="myForm" type="com.mycompany.MyFormBean"></form-bean> <action name="myForm" path="/myAction" scope="request" type="com.mycompany.MyAction"></action>
If you do this, struts populates MyFormBean for you when the form is submitted. If you want to display values from this bean in the next page, just put the instance of MyFormBean in some scope (request, session, or application) with the setAttribute() method and use the <bean:write> tag in the JSP to display its properties. The <bean:write> tag looks for the bean in any scope.