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.的更多相关文章

  1. org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter与org.apache.struts.dispatcher.FilterDispatcher是什么区别?

    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter与org.apache.struts.dispatcher.F ...

  2. 解决struts2中UI标签出现的问题: The Struts dispatcher cannot be found

    解决struts2中UI标签出现的问题: The Struts dispatcher cannot be found 异常信息: The Struts dispatcher cannot be fou ...

  3. 用Struts2框架报错:The Struts dispatcher cannot be found

    报错信息 The Struts dispatcher cannot be found.  This is usually caused by using Struts tags without the ...

  4. struts2学习笔记--struts.xml配置文件详解

    这一节主要讲解struts2里面的struts.xml的常用标签及作用: 解决乱码问题 <constant name="struts.i18n.encoding" value ...

  5. 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 ...

  6. Struts2学习笔记--Struts例子及开发流程

    参考资料:http://blog.csdn.net/hntyzgn2010/article/details/5547753 http://chenlh.iteye.com/blog/464341 入门 ...

  7. struts2.0中struts.xml配置文件详解

    先来展示一个配置文件 <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration ...

  8. 1-1 struts2 基本配置 struts.xml配置文件详解

    详见http://www.cnblogs.com/dooor/p/5323716.html 一. struts2工作原理(网友总结,千遍一律) 1 客户端初始化一个指向Servlet容器(例如Tomc ...

  9. Struts2基础-4-2 -struts拦截器实现权限控制案例+ 模型驱动处理请求参数 + Action方法动态调用

    1.新建项目,添加jar包到WEB-INF目录下的lib文件夹,并添加到builde path里面 整体目录结构如下 2.新建web.xml,添加struts2核心过滤器,和默认首页 <?xml ...

随机推荐

  1. Objective-C 成员变量的访问修饰即成员变量可见性解析

    总体来说Objective-C的访问成员变量可见性和C++基本一样,只是多了个@package. 以下是详细说明: 例子: @interface CTPerson : NSObject { @priv ...

  2. java新手笔记12 单例

    1.单例 package com.yfs.javase; public class Singleton { //private static final Singleton single = new ...

  3. Codevs 1697 ⑨要写信

    1697 ⑨要写信 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 传送门 题目描述 Description 琪露诺(冰之妖精)有操控冷气的能力.能瞬间冻结小东西,比 ...

  4. PAT_1016 部分A+B

    问题描述: 正整数A的“DA(为1位整数)部分”定义为由A中所有DA组成的新整数PA.例如:给定A = 3862767,DA = 6,则A的“6部分”PA是66,因为A中有2个6. 现给定A.DA.B ...

  5. _itoa_s, _i64toa_s, _ui64toa_s, _itow_s, _i64tow_s, _ui64tow_s

    Converts an integer to a string. These are versions of _itoa, _i64toa, _ui64toa, _itow, _i64tow, _ui ...

  6. git push后修改错误的commit message

    Easiest solution (but please read this whole answer before doing this): git rebase -i <hash-of-co ...

  7. jsp 嵌套iframe 从iframe中表单提交并传值到外层

    今天因需求迭代 更改元来代码 遇到了这么个问题 就是想在 iframe中提交后进行整个页面的跳转 并把iframe中的值传到外层jsp 大概就是这个样子 外层 a.jsp <div id=&qu ...

  8. centos VM 识别U盘

    在VM设置选项中,选择 USB Controller 选项,设置相关参数即可

  9. 转:android中APK开机自动运行

    背景知识:当Android启动时,会发出一个系统广播,内容为ACTION_BOOT_COMPLETED,它的字符串常量表示为android.intent.action.BOOT_COMPLETED.只 ...

  10. 移动web问题小结

    Meta标签: <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalab ...