Re: Clarification on withInboundCorrection method…

Splash Forums Rewrite Users Clarification on withInboundCorrection method… Re: Clarification on withInboundCorrection method…

#22506

I think I found the root cause of all this. It seems like Tomcat is placing the RewriteFilter AFTER the TapestrySpringFilter. I’ve no idea why this is happening, but if I manually add the RewriteFilter to the web.xml of the application everything works as expected.

<filter>
<filter-name>OCPsoft Rewrite Filter</filter-name>
<filter-class>org.ocpsoft.rewrite.servlet.RewriteFilter</filter-class>
<async-supported>true</async-supported>
</filter>
<filter-mapping>
<filter-name>OCPsoft Rewrite Filter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ASYNC</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>

<filter>
<filter-name>app</filter-name>
<filter-class>org.apache.tapestry5.spring.TapestrySpringFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>app</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>

Now accessing /moduleA/ThePage results in a redirect on Tomcat and AS7.

Unfortunately /PrettyURL still gives a 404 but on Tomcat this works correctly. So this just seems to be a Tapestry incompatibility with AS7. But on Tomcat everything works fine now.