struts2错误:The Struts dispatcher cannot be found.
struts2错误:The Struts dispatcher cannot be found.
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]
at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
at org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)
at org.apache.jsp.message._404_jsp._jspService(_404_jsp.java:159)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
解决办法:加了标签后,出现此问题
其实最后只在原配置基础上加上.jsp过滤即可
<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>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
struts2错误:The Struts dispatcher cannot be found.的更多相关文章
- org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter与org.apache.struts.dispatcher.FilterDispatcher是什么区别?
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter与org.apache.struts.dispatcher.F ...
- 解决struts2中UI标签出现的问题: The Struts dispatcher cannot be found
解决struts2中UI标签出现的问题: The Struts dispatcher cannot be found 异常信息: The Struts dispatcher cannot be fou ...
- 用Struts2框架报错:The Struts dispatcher cannot be found
报错信息 The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the ...
- struts2学习笔记--struts.xml配置文件详解
这一节主要讲解struts2里面的struts.xml的常用标签及作用: 解决乱码问题 <constant name="struts.i18n.encoding" value ...
- The Struts dispatcher cannot be found. This is usually caused by using Strut
The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the assoc ...
- Struts2学习笔记--Struts例子及开发流程
参考资料:http://blog.csdn.net/hntyzgn2010/article/details/5547753 http://chenlh.iteye.com/blog/464341 入门 ...
- struts2.0中struts.xml配置文件详解
先来展示一个配置文件 <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration ...
- 1-1 struts2 基本配置 struts.xml配置文件详解
详见http://www.cnblogs.com/dooor/p/5323716.html 一. struts2工作原理(网友总结,千遍一律) 1 客户端初始化一个指向Servlet容器(例如Tomc ...
- Struts2基础-4-2 -struts拦截器实现权限控制案例+ 模型驱动处理请求参数 + Action方法动态调用
1.新建项目,添加jar包到WEB-INF目录下的lib文件夹,并添加到builde path里面 整体目录结构如下 2.新建web.xml,添加struts2核心过滤器,和默认首页 <?xml ...
随机推荐
- 00_ForTest
-----该页是爬虫的测试页请忽略------- 1234545@qq.comadasdsdasdsad阿打算多少其热情为 asdasdasdasd4w5wsdvv啊实打实大 啊实打实大asdasda ...
- Stay Hungry, Stay Foolish--2005斯坦福大学05年毕业演讲
转自http://www.cnblogs.com/daizhj/articles/1493813.html 斯蒂夫•保罗•乔布斯(Steve Paul Jobs,1955年2月24日出生-)是蘋果電腦 ...
- mysql 主从 Got fatal error 1236 from master when reading data from binary log: 'Could not find first 错误
本地MySQL环境,是两台MySQL做M-M复制.今天发现错误信息: mysql 5.5.28-log> show slave status\G ************************ ...
- 构建 struts2 spring3 mybatis 的maven项目 构建 pom.xml
学习maven项目时 搭建个ssm项目 算是给自己留个备份吧 环境说明: MyEclipse10 Maven 3.2.3 框架: struts2 2.3.24.1 spring3 3. ...
- React组件三
<script> <!-- getDefalutPros 设置组件的默认值--> <!--var Mytitle=React.createClass({ getDefau ...
- 基于smarty+medoo手搭php简单的框架
1.首先看一下搭建好的smarty目录(箭头位置是后新建的文件夹,也是框架结构的最终目录结构) 2.首先在根目录下新建index.php文件即入口文件,内容如下 <?phprequire_onc ...
- 网站seo优化--jsoup 批量分析相关网站 标签,描述,关键词.
网站seo优化--jsoup 批量分析相关网站 标签,描述,关键词. 因为自己写了一个磁力搜索网站Btgoogle,准备进行优化一下,需要分析其他的网站的优化情况. Java的Jsoup类库和PHP的 ...
- string内存管理
本人从事.net开发快两年了,一直认为鄙人的C++基础还是很扎实的,并且对Windows操作系统也有一定认识(Linux系就真比较少用),刚毕业的时候,也曾经经常研究游戏破解之类的小外挂,那时候真是折 ...
- The Unified Modeling Language(UML)
统一过程建模语言UML 统一过程建模语言UML是一种标准的可视化建模语言,使用在: 业务建模和类似的过程 居于软件系统的分析.设计.和实现 UML 是一门通用语言,提供给业务分析员,软件架构师和开发 ...
- 总结iframe高度自适应,自适应子页面高度
在网上找了很多iframe的高度自适应,发现很多兼容性都不是很好,于是自己总结了一下. 页面html节点上要有 <!DOCTYPE html PUBLIC "-//W3C//DTD ...