...
The default value of this attribute changed from "get" to "none". See https://issues.apache.org/struts/browse/WW-2901
Filter Mapping and Servlets
If your application also has servlets you may need to adjust the Struts filter-mapping to allow the requests through to your servlets.
With 2.0.11 you could have your struts filter configured to match all requests and those that did not have a .action suffix would be passed through to your servlets.
The web.xml before:
Code Block |
---|
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
|
With 2.1.6 it appears that the struts filter attempts to match all requests to action even if they do not have a .action suffix (even when not using conventions plugin.) If you have non-action requests then you will need to modify the struts filter mapping so that only action requests are matched. I the example below I've changed the url-pattern to be "*.action".
The web.xml after:
Code Block |
---|
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
|
Trouble-shooting
The issues are listed in the same order as encountered after changing jars over from 2.0.x to 2.1.x. Noteworthy, the migration was done under the following setup: Fedora core 6, JDK 1.6.0_2 and Tomcat 6.0.10 running from MyEclipse plugin.
...