Details
-
Type:
Improvement
-
Status: Resolved
-
Priority:
Major
-
Resolution: Complete
-
Affects Version/s: 1.1.0.RELEASE, 1.1.1.RELEASE, 1.1.2.RELEASE, 1.1.3.RELEASE, 1.2.0.RC1
-
Fix Version/s: 1.1.1.RELEASE
-
Component/s: @ CORE
-
Labels:None
Description
As a Roo Addon developer, I want an easy way to add dispatcher tags to filter-mappings.
Please modify WebXmlUtils.addFilterAtPosition to allow this.
Example:
WebXmlUtils.addFilterAtPosition(WebXmlUtils.FilterPosition.AFTER, WebMvcOperations.OPEN_ENTITYMANAGER_IN_VIEW_FILTER_NAME, null, "myFilter", "org.myfilter.MyFilter", "/*", webXmlDoc, null, new WebXmlUtils.WebXmlParam("my-param", "value"), new WebXmlUtils.WebXmlDispatcher("FORWARD"), new WebXmlUtils.WebXmlDispatcher("REQUEST"), new WebXmlUtils.WebXmlDispatcher("ERROR"));
would generate:
<filter>
<filter-name>myFilter</filter-name>
<filter-class>org.myfilter.MyFilter</filter-class>
<init-param>
<param-name>my-param</param-name>
<param-value>value</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>