对于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.
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

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.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:52)
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49)
org.apache.jsp.login_jsp._jspx_meth_s_005ftextfield_005f0(login_jsp.java:106)
org.apache.jsp.login_jsp._jspService(login_jsp.java:70)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

解决方案是:

在web.xml页面中

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

最新文章

  1. sqlServer去除字段中的中文
  2. 解读ContentResolver和ContentProvider
  3. 【DIY】【外壳】木板 &amp; 亚克力 加工
  4. 【图论】深入理解Dijsktra算法
  5. Java SE 第十一讲----面向对象特征之封装2
  6. cookie、localStorage、sessionStorage之间的区别
  7. BestCoder Round #67 (div.2) N*M bulbs
  8. 前端CSS兼容的一些思路
  9. 关于link, visited, hover, active
  10. C++程序中应增加STL、运算和字符串的头文件
  11. Jdom读取XML文件
  12. 【Hexo】Hexo+Github构建个人博客 (三):添加皮肤主题
  13. Luogu P1860 新魔法药水
  14. 前端的UI设计与交互之数据录入篇
  15. Scipy教程 - 统计函数库scipy.stats
  16. IP的种类与获取方式
  17. MOOS学习笔记1——HelloWorld
  18. windows安装MongoDB副本集,通过Java程序实现数据的插入与查询
  19. requirements.txt文件教程
  20. common lisp的几个基本概念

热门文章

  1. Java SPI
  2. CentOS和RedHat等系列系统 yum源配置、时间同步
  3. 将字符串 “ hello word,你 好 世 界 ! ” 两端空格去掉并且将其中的其他所有空格替换成一个空格 输出结果为“hello word,你 好 世界”
  4. 撩课-Java每天5道面试题第10天
  5. CentOS-Linux系统下安装MySQL
  6. C# 读写txt文件方法
  7. EasyNetQ简单使用
  8. css权威指南读书笔记-第10章浮动和定位
  9. HTTP协议教程
  10. 【JavaScript】闭包应用之数据独立