Hello,
 
We're moving from a Struts 1.x with Tiles development model to Struts 2
and Sitemesh.
 
One thing we miss with from Tiles is the ability to back a JSP with a
Controller.  The Controller guaranteed that whenever a JSP was rendered,
certain behavior was executed to prepare data for the JSP.  For example,
the loading of data for drop-down select boxes was often placed in the
Controller.
 
Now that we're not using Tiles we can no longer use Controllers, so I'm
wondering if Struts 2 has any sort of equivalent functionality.  I'm
familiar with the Struts 2 Preparable interface, but I don't like this
because prepare() is always called -- even on form posts, which in my
case, is at best an unnecessary database hit (or hits), and at worst can
cause confusion with what was actually posted from the page vs. what was
retrieved from prepare().
 
If it helps any, we have a 1:1 mapping between an Action and a JSP,
including a naming convention:  MyFavoriteAction maps to myFavorite.jsp.
 
Any thoughts or comments?
 
Thank you!!
 
-Ryan
 
 
 

This e-mail message is being sent solely for use by the intended recipient(s) 
and may contain confidential information.  Any unauthorized review, use, 
disclosure or distribution is prohibited.  If you are not the intended 
recipient, please contact the sender by phone or reply by e-mail, delete the 
original message and destroy all copies. Thank you.

Reply via email to