I've committed a new filter dispatcher strategy that aims to: * Make it crystal clear to users how to deploy Struts * Make it crystal clear to developers what filters are doing what processes * Better enable customizations and overrides by advanced users
This first cut is more about tackling the first two issues, and I'd like to get some feedback on them. There are a number of tickets that are caused by buggy and confusing filter dispatchers and their deployments, as well as I have a need to have our dispatch process be more flexible to support things like native operation in OSGi or in a plugin system. You'll notice that there is certainly more code in this new design, however, I'm hoping it is self-documenting, brain-dead code that is easier to read and follow. I've outlined how it would be used in the package Javadocs: Simple Dispatcher <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> Deployment with Sitemesh <filter> <filter-name>struts2-prepare</filter-name> <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareFilter</filter-class> </filter> <filter> <filter-name>sitemesh</filter-name> <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class> </filter> <filter> <filter-name>struts2-execute</filter-name> <filter-class>org.apache.struts2.dispatcher.filter.StrutsExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2-prepare</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>sitemesh</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>struts2-execute</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> So basically, a one-to-one, filter to usecase mapping. Please take a look at the code as I'd like to get this finalized in the next few days: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/filter/ Thanks, Don PS. We are 46% of the way to GA 2.1 release... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]