Hello Ranchers, I have some values stored in session variables in my Action class.
And as i am forwarded to a JSP Page i would like those values to be displayed in the text box on the page.
<bean:write name="...." /> is an alternative. But how to display the values inside the text box.
Pls do reply.
posted 10 years ago
The solution is to write a JavaBean class that extends ActionForm and associate that form to the Action mappping in your struts-config file. In your Action class, you would then populate the property of this bean with the value you want displayed in the text box. you would then use the Struts custom tag <html:text> to display the text box with the value.
If you don't understand the relationship between a Struts Action, an ActionForm, and a JSP that uses <html:xxx> tags, I'd suggest you take a moment to do one of the tutorials in this link.