At 8:38 PM -0800 3/23/05, Martin Cooper wrote:
In the regular scheme of things, when, for example, an Action returns
an ActionForward, the request processor lets Tiles have a look at the
forward, so that it can handle the case where a path is a Tile rather
than a genuine path. Unfortunately, this doesn't happen in all cases,
specifically in the new world of Chain and the composable request
processor.

For example, when the path in an <exception> definition is followed,
Tiles doesn't get a chance to play in the game. This is because Tiles
only gets to play after ExecuteAction succeeds. In this particular
case, I believe that inserting the TilesPreProcessor command in the
middle of the 'servlet-exception' chain will do the trick.

However, before making this change (and testing it ;), I wanted to
ping the list to see if there are other scenarios that people can come
up with in which this kind of thing might happen. Is this just a
one-off bug, or do we have a bigger issue with getting Tiles into play
in all the right places?

Well, I think it's kind of a hack -- albeit I think it's the right hack based on what we have right now. Putting the PreProcessor in there should make it work, at least. Reasons like this are what make me pretty sure that the best possible scenario would be to push all of Tiles into its own TilesViewServlet which would simply be mapped to some other Servlet handling path, and leave the tiles processing to requestDispatcher and the servlet container.


I know that this is how non-Struts projects use Tiles. I just haven't looked at what exactly is gained by using Tiles inside Struts instead of outside of it -- when I made the TilesPreProcessor, I just tried to replicate the behavior that the TilesRequestProcessor added. But given that people do use it outside of Struts (i.e. http://www.jroller.com/page/RickHigh/20040609#tiles_and_jsf_oh_my), it's probably doesn't do anything more than save the trouble of configuring a second servlet.

David G, or anyone: is there a reason that the TilesServlet class was removed from the distribution?

http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org/apache/struts/tiles/TilesServlet.java?hideattic=0&rev=1.6&view=log

Joe


--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to