I am building an application using struts2. The web.xml file looks like below
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filt开发者_开发知识库er.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
The application runs fine. Now I have a JSP which needs some input from servlet, So i wrote a servlet and added servlet-mapping in web.xml, but the server cannot find the servlet because of the filter-mapping. How to use servlets in struts 2 and what should web.xml look like?
from: http://struts-2.464677.n5.nabble.com/using-servlets-in-a-struts-2-project-td465399.html
That particular servlet should be excluded from you Struts filter in struts.xml
精彩评论