The Struts dispatcher cannot be found. 在页面使用struts2的标签时报的异常
来源:互联网 发布:网络存储服务器有哪些 编辑:程序博客网 时间:2024/05/17 22:11
web.xml文件配置:
<context-param>
<param-name>contextConfigLocation</param-name><param-value>classpath:applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
在页面中也是正确的引用了struts2的标签,但是一打开那个页面就包异常:
org.apache.jasper.JasperException: 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]org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
在把web.xml里面的 struts2配置映射<url-pattern>*.action</url-pattern> 改为<url-pattern>/*</url-pattern> 就正常了....
这是什么原理?
- The Struts dispatcher cannot be found. 在页面使用struts2的标签时报的异常
- Struts2.0的异常 The Struts dispatcher cannot be found.
- struts2常见标签异常:The Struts dispatcher cannot be found.
- The Struts dispatcher cannot be found异常的解决方法
- 解决struts2中UI标签出现的问题: The Struts dispatcher cannot be found
- The Struts dispatcher cannot be found. 使用struts标签时该报错的解决方案
- struts2标签 The Struts dispatcher cannot be found
- struts2 异常信息:The Struts dispatcher cannot be found.
- struts2 The Struts dispatcher cannot be found异常解决办法
- the Struts dispatcher cannot be found. 在struts2中出现的问题
- The Struts dispatcher cannot be found在struts2中出现的问题
- The Struts dispatcher cannot be found在struts2中出现的问题
- The Struts dispatcher cannot be found在struts2中出现的问题
- The Struts dispatcher cannot be found在struts2中出现的问题
- Struts2-The Struts dispatcher cannot be found
- struts2访问jsp页面异常The Struts dispatcher cannot be
- struts2 标签使用异常 The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filte
- struts标签错误The Struts dispatcher cannot be found.
- 360这是要干嘛
- 16. 小议注释
- arm_linux_device_mem内存映射
- Codeforces Round #196 (Div. 2)
- 选择排序与冒泡排序
- The Struts dispatcher cannot be found. 在页面使用struts2的标签时报的异常
- 51单片机溢出率的计算
- URAL 1424. Minibus (贪心+multiset+multimap+线段树)
- 【Java】IO操作之将Jtable数据导出为Excel表格
- Reactor模式 - @ Pattern by java【转载内容】
- VC 2008 express
- 各类函数类型
- 内核编译例子(hello),Makefile
- Hadoop 伪分布式模式 MapReduce 任务不能继续运行 解决方案