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] > >