为什么struts2 在web.xml中写了filter就不能打开jsp文件了

其中jsp文件放在F:\tomcat\webapps\2
web.xml放在F:\tomcat\webapps\2\WEB-INF

//web.xml中的filter

struts2

org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter



struts2
/2/*.action

filter的一部分打印不出来。

请求问题,/*是拦截所有的请求,而*.action只过滤以.action结尾的请求。

放在web-inf下的文件是不能直接访问的(安全问题),只能通过后台跳转的方式。所以你输入http://127.0.0.18080/2/second.jsp是访问不到的。

问题解决:http://www.everycoding.com/question/145.html

访问不了的话是因为你的struts配置有问题