zoukankan      html  css  js  c++  java
  • The Struts dispatcher cannot be found. This is usually caused by using Struts

    对于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>

  • 相关阅读:
    OpenGL 一
    Git-SSH
    CGAffineTransform 视频旋转
    UI学习笔记---第十一天UITableView表视图高级-自定义cell
    UI学习笔记---第十天UITableView表视图编辑
    UI学习笔记---第九天UITableView表视图
    UITextView 点return 隐藏键盘
    UI学习笔记---第八天
    UI学习笔记---第七天
    UI学习笔记---第六天
  • 原文地址:https://www.cnblogs.com/changna1314/p/6849319.html
Copyright © 2011-2022 走看看