This week's book / license giveaways are in the JDBC and Relational Databases and Java in General forums.
We're giving away four copies each of PostGIS in Action and Java Advanced Topics Training and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Struts Application Design Question re ActionForms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Application Design Question re ActionForms" Watch "Struts Application Design Question re ActionForms" New topic

Struts Application Design Question re ActionForms

Ian Davies

Joined: Oct 15, 2003
Posts: 1
I am new to Struts but understand the basics. However, I have a question regarding to the best practices of using Action Forms.
ActionForms are great for processing HTTP parameters typically read from a HTML form. However, would you say that it is a good idea to have some other properties of the ActionForm that are not related to the HTML form but are populated by the Action class and used by the page that the Action forwards to, i.e. it is essentially a method of passing values to a subsequent page as a result of some action being performed?
If this is not recommended, could someone please suggest some best practices for passing parameters from one page to another?
Many thanks,
Eric Sexton
Ranch Hand

Joined: Sep 12, 2003
Posts: 133
When I need to carry/pass values around I usually will just set a session or request attribute in the action. I don't know if it's right or wrong within Struts, but that's what I do.
I agree. Here's the link:
subject: Struts Application Design Question re ActionForms