Hi, 

Lets say I have this webapp based on Struts and Tiles. One page is for
displaying the contents of a database table. So, of course, I created this
small custom taglib to encapsulate the mechanics required for iterating
through a ResultSet and displaying its records in a table.

Now, new features have to be added like paging and editing. In an effort to
keep the design clean, I wish to do some of the processing before the tags
get evaluated like creating a beans collection with a subset of the
ResultSet. I have to decide where this is going to happen...

...in a bean, called from the JSP page with a reference to the pageContext
or directly in the page as a scriptlet;

...in a Struts action serving as a front to the JSP page;

...in a descendant of org.apache.struts.tiles.Controller that is specified
with the controllerClass attribute of a Tiles definition.

...in some other place? Please tell me.

I leave the first option out. I would like to keep the page simple and free
of Java code whenever possible. It could also be said that this stuff
doesn't belong in VIEW components. 

Then I look for documented benefits of using the Tiles solution. I can't
find any. I dig a while in Tiles'src and try to understand its inner
workings... Finaly, I come to the conclusion it offers me no advantages over
the Struts Action. Have I missed something?

Perhaps I should keep the Tiles solution for times where I want to have
access to Tiles definitions programmaticaly. What do you think?


Etienne

Reply via email to