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>

时间: 2024-11-08 21:38:35

The Struts dispatcher cannot be found. This is usually caused by using Struts的相关文章

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 t

The Struts dispatcher cannot be found异常的解决方法

系统错误:HTTP Status 500 异常信息:The Struts dispatcher cannot be found.  This is usually caused by using Struts tagswithout the associated filter. Struts tags are only usable when the request haspassed through its servlet filter, which initializes the Strut

This is usually caused by using Struts tags without the associated filter.

1.错误描述 严重: Servlet.service() for servlet [jsp] in context with path [/SendMail] threw exception [An exception occurred processing JSP page /pages/fileupload/fileUpload.jsp at line 42 39: <table> 40: <tr> 41: <td> 42: <s:fielderror css

The struts dispatcher cannot be found

1.错误描述 严重:Servlet.service() for servlet jsp threw exception The struts dispatcher cannot be found.This is usually called by using struts tags without the associated filters.Struts tags are only usable when the request has passed through its servlet f

【SSH异常系列】The Struts dispatcher cannot be found.

最近在SSH中使用ONGL表达式的时候一直报错,其根本的错误是:The Struts dispatcher cannot be found. 最后的解决方法是 将struts.xml中配置的过滤器类型改为 /* 用ONGL表达式的时候必须要使用/*. 版权声明:本文为博主原创文章,未经博主允许不得转载.

struts的异常处理

异常信息: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

struts2学习笔记--使用Validator校验数据

我们在进行一些操作是需要对用户的输入数据进行验证,比如网站的注册,需要对各个数据项进行数据校验,Struts2提供了一些默认的校验器,比如数字的检测,邮箱的检测,字符串长度的检测等等. 常用的Validator 校验器 作用  required  必填校验器,要求字段必须有值  requiredstring 必填字符串校验器,要求必须有值且长度大于0,即不能是空字符串.默认会去掉字符串前后空格 参数fieldName:该参数指定校验的字段名称,如果是字段校验,则不用指定该参数 参数trim:该参

Struts2学习之文件上传/下载&amp;ValueStack(三)

简介 今天是学习Struts2第三天,也算struts2准备前奏告一段落,提升部分只能在后期深入了解,多看源码,多参阅资料.今天所学的知识点文件上传.下载/ValueStack&OGNL/Struts2标签 文件上传/下载 文件上传简介 a). 企业常用文件上传技术 : jspSmartUpload(主要应用 JSP model1 时代) . fileupload (Apache commons项目中一个组件). Servlet3.0 集成文件上传 Part类 b). Struts2 对文件上传

struts2国际化全例 错误解决

在struts2中需要做国际化的有: jsp页面的国际化,action错误信息的国际化,转换错误信息的国际化,校验错误信息的国际化 在之前的例子中已经做过和国际化相关的例子了,在struts.xml中配置过 view plaincopy to clipboardprint? <constant name="struts.custom.i18n.resources" value="message"></constant> 其中的message就