Dilip, The tiles controller sounds like an interesting way to do it, but I have never used it. I agree with Nels that you should stay away from a JSP implementation of this. I have stretched tiles pretty far as to what it can do conditionally, and I have been very happy with it. I would suggest using an action to make decisions about where to go, and use tiles templates to put the right fragments in the right places.
Michael On 8/25/05, Nels Overgaard-Cook <[EMAIL PROTECTED]> wrote: > If you put the business logic in the JSPs, then it seems to me that you're > essentially mixing the business and presentation layers. I would put the > business login in an action and figure out which tile to forward to from > there. Of course, I haven't used the Tiles Controller that Greg suggested... > > Nels > > On 8/25/05, Dilip Ladhani <[EMAIL PROTECTED]> 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 > > 2)Should I use tiles by having different action mappings based on > > different > > business parameters(say app type) and have each mapping forward to a > > different "forward" defined in tiles-def. > > > > Also the business parameters (based on which jsp is selected) may change > > in > > the future. > > > > Thanks for your input > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]