During the integration of axis2 and struts, Struts intercepts the axis address. By default, it is treated as an action,
An error is reported because the action cannot be found;
1 <! -- Struts configuration --> 2 <filter> 3 <filter-Name> struts2 </filter-Name> 4 <filter-class> Org. apache. struts2.dispatcher. ng. filter. strutsprepareandexecutefilter </filter-class> 5 </filter> 6 <filter-mapping> 7 <filter-Name> struts2 </filter-Name> 8 <URL-pattern>/* </url-pattern> 9 </filter-mapping>
1 <! -- Axis configuration --> 2 <servlet> 3 <servlet-Name> axisservlet </servlet-Name> 4 <servlet-class> Org. apache. axis2.transport. HTTP. axisservlet </servlet-class> 5 <load-on-startup> 1 </load-on-startup> 6 </servlet> 7 <servlet-mapping> 8 <servlet-name> axisservlet </servlet-Name> 9 <URL-pattern>/services/* </url-pattern> 10 </servlet-mapping>
Two solutions:
1. Add the addresses for filtering exclusion to the Struts. xml configuration file.
1 <constant name="struts.action.excludePattern" value="/services.*"/>
The "." symbol in value is required. For example, if the filter address is "/services/*", the value must be set to "/services .*"
Ii. Rewrite the default struts filter class
For detailed steps, refer to this article: http://blog.csdn.net/lishengbo/article/details/5474044
Axis2 + Struts interception address conflict