On 7/29/05, Greg Reddin <[EMAIL PROTECTED]> wrote: > On Jul 29, 2005, at 1:55 AM, Craig McClanahan wrote: > > It's sort of a different way to look at it, but consider this ... > > maybe the act of configuring the filter *is* your indication that you > > want to check for reloads, and lack of the filter would work as things > > do today (i.e. you have to reload the app to recognize changes). That > > way, people who don't care about checking for reloads have zero > > performance penalty to worry about. > > I wonder if TilesServlet would be better suited as a Filter. It > doesn't do anything but make sure the DefinitionsFactory is loaded. We > could provide 2 implementations: one that does the reload check and > one that doesn't -- or provide a single Filter with a configuration > param that indicates whether to check or not.
Interesting idea. In my ideal world, though, I'd use a ServletContextListener instead of a Servlet to load this stuff, because that is the recommended design pattern (but we would need to be willing to commit to Servlet 2.3 as the base platform). In such a case, we'd still need a filter. Using a listener gives you another interesting "hack" as an option ... it's possible to embed a listener registration inside a TLD that is inside a JAR file, so the act of dropping the JAR into your app also triggers configuration -- no web.xml changes needed. (This is what the JSF RI does, and MyFaces is going to do as well, for example.) > > Greg > Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]