Hi,
i have the following web.xml:
<filter>
<filter-name>struts2</filter-name>
<filter-
class
>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</
filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
No as you can see, i want all URLs resolved by Struts2 but /services/
should be handled by CXF. This worked with Struts 2.0.x and CXF but
with latest Struts2, the Filter seems to be changed. Apart from the
fact that i know use StrutsPrepareAndExecuteFilter instead of
FilterDispatchter (using FilterDispatcher makes no difference
regarding my problem), it seems that Struts2 now treats every URL as
it should be processed by the framework, even without mapping and
namespaces for it.
The ciritical point is the following code in the Struts filter:
ActionMapping mapping = prepare.findActionMapping(request, response);
if (mapping == null) {
boolean handled =
execute.executeStaticResourceRequest(request, response);
if (!handled) {
chain.doFilter(request, response);
}
}
If it wouldnt find a mapping (in fact there is no mapping but the
object is nevertheless != null) i think it would work because
executeStaticResourceRequest() would return false and the normal
processing chain of the Request would occur.
I cant change the struts2 url filter mapping beause that would break
so much code of my existing app that i would rather modify the Filter
not to handle "/service" urls. Again all this is because of a very
poor web.xml (servlet) spec with regard to simple url-pattern without
the chance to exclude something....
Any hints ??
---
regards
Marc Logemann
http://www.logemann.org
http://www.logentis.de
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org