On Aug 25, 2005, at 3:15 PM, Dilip Ladhani wrote:
I have an application built on struts and tiles. I have a design
question and would like some of your valuable opinions.
I have a huge jsp, which is broken into many includes, say abc.jsp and
includes one.jsp, two.jsp etc.
As, I mentioned I use tiles so in the config file, I have a forward
element, which is like this
<forward name="abc" path="abc" contextRelative="true"/>
The "abc" is defined in the tiles as
<put name="body-content" value="/abc.jsp" />
Now for the design question...
I am going to have to switch the includes (one.jsp, two.jsp etc) based
on some business rules like the geographical area, app type etc.
1) Should I just put this logic in the jsp (using if statements like
:if apptype = "A" use one.jsp else use one-next.jsp etc) or
You should probably stay away from this if possible.
Have you looked at the Tiles Controller interface? You might be able
to put your business logic in a controller class. The ComponentContext
is passed into the controller and you can set attribute values, etc.
Greg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]