The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. 异常
2016-04-27 14:17
906 查看
异常信息如下:
解决办法:
struts2的标签已经引入了,查询后归纳了以下几种方法:
1.将web.xml下的struts2过滤器的过滤方式从.action改为/*;不过这种方式自己感觉不太好,应该这样默认就将所有的进行了过滤,可能会对有些应用带来麻烦,例如:fck的配置
2. 修改Test.jsp 文件,不使用 struts 的标签
3.就是在web.xml配置文件中再添加一个filter:
The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]
解决办法:
struts2的标签已经引入了,查询后归纳了以下几种方法:
1.将web.xml下的struts2过滤器的过滤方式从.action改为/*;不过这种方式自己感觉不太好,应该这样默认就将所有的进行了过滤,可能会对有些应用带来麻烦,例如:fck的配置
2. 修改Test.jsp 文件,不使用 struts 的标签
3.就是在web.xml配置文件中再添加一个filter:
<filter-mapping> <filter-name>struts2</filter-name> <url-pattern>*.jsp</url-pattern> </filter-mapping> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>*.action</url-pattern> </filter-mapping>
相关文章推荐
- eclipse巧用正则表达式替换
- Java IO:PipedReader和PipedWriter使用详解及源码分析
- RxJava----操作符:算术和聚合操作符
- java日志commons-logging/log4j/slf4j/logBack需要知道的几件事
- java7 实用的新特性:编程技巧
- JAVA_SE基础——63.String类的常用方法
- Java图片处理的类库:SimpleImage
- java运行本地命令
- Java SpringMVC项目导出excel多种类对应工具类整理(util)
- Java中的两个关键字——super、this
- Java之设计模式
- Java三大框架入门-struts2入门(一)
- 利用myeclipse建立webservice服务端和客户端
- Spring Aop和websocket
- 数字签名
- Spring MVC坑汇总+Stackoverflow巧解答
- 通过eclipse生成doc
- final关键字用于String时的一个问题
- 使用MyEclipse格式化JSP设置
- Spring注解详解