`
peonyzzdx
  • 浏览: 583197 次
  • 性别: Icon_minigender_2
  • 来自: 杭州
社区版块
存档分类
最新评论

异常The Struts dispatcher cannot be found.this is usually caused by using struts

 
阅读更多
1.http staus 500
The Struts dispatcher cannot be found.this is usually  caused by using struts tags without the ossociated filter.....



解决方法:
(1)JSP页面中使用了标签
<%@ taglib prefix="s" uri="/struts-tags"%>
(2)不是/*
<filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

我的错误写法
<filter-mapping>
  <filter-name>struts2</filter-name>
  <url-pattern>*.action</url-pattern>
  </filter-mapping>


解析:
过滤的是*.action的请求行为,如果不经过action就无法调用struts2的标签包,使得s标签无法使用
解决办法:把<url-pattern>*.action</url-pattern>改为<url-pattern>/*</url-pattern>或者通过action访问带s标签的jsp页面
  • 大小: 348.7 KB
分享到:
评论

相关推荐

    Struts课堂笔记.rar--struts2的struts.properties配置文件详解

    The org.apache.struts2.dispatcher.multipart.MultiPartRequest parser implementation for a multipart request (file upload) 专为multipart请求信息使用的org.apache.struts2.dispatcher.multipart....

    org.apache.struts2.dispatcher.FilterDispatcher

    org.apache.struts2.dispatcher.FilterDispatcher

    struts 2.2 api文档

    org.apache.struts2.dispatcher.ng, org.apache.struts2.dispatcher.ng.filter, org.apache.struts2.dispatcher.ng.listener, org.apache.struts2.dispatcher.ng.servlet, org.apache.struts2.impl, org.apache....

    struts2上传必备jar包,避免出现struts2的升级漏洞!自己吃亏后分享

    at org.apache.struts2.dispatcher.Dispatcher.cleanUpRequest(Dispatcher.java:837) at org.apache.struts2.dispatcher.ng.PrepareOperations.cleanupRequest(PrepareOperations.java:103) at org.apache.struts2....

    struts-2.3.33-lib.zip

    struts2官网2.3版本的最后一个版本,能够...注意此版本的dispatcher是org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter。详见https://struts.apache.org/docs/struts-23-to-25-migration.html。

    struts 2.3.4.1 最新英文版API

    org.apache.struts2.dispatcher.ng This package contains a reimagining of the traditional Struts filter dispatchers. org.apache.struts2.dispatcher.ng.filter org.apache.struts2.dispatcher.ng.listener ...

    struts2的struts.properties配置文件详解

    9. struts.dispatcher.parametersWorkaround:这是一个布尔值,用于确定是否使用Servlet请求参数工作区(PARAMETERSWORKAROUND),该工作区用于某些版本的WebLogic。 10. struts.enable.DynamicMethodInvocation:...

    struts-2.5.12-lib.zip

    官网对struts2的2.5版本做了一些修改,包括dispatcher(org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter)等,详见https://struts.apache.org/docs/struts-23-to-25-migration.html。

    新struts2+jQuery所需包.rar

    &lt;filter-class&gt;org.apache.struts2.dispatcher.FilterDispatcher, 新版本中都是过时的了,采取该过滤器, &lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter。

    解决struts2下载异常的jar包 struts2-sunspoter-stream-1.0.jar

    at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:108) at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:770) at org.apache.struts2....

    Struts2.5.2的配置及问题解决

    针对Struts2.5.2最新版本的配置进行了梳理,通过一步步的步骤和发生的问题点的解决,完成对Struts2.5.2的配置。

    tomcat报错Unable to find 'struts multipart saveDir解决

    tomcat报错Unable to find 'struts multipart saveDir解决

    Struts2属性文件详解

    struts.diSPAtcher.parametersWorkaround 对于某些Java EE服务器,不支持HttpServlet Request调用getParameterMap()方法,此时可以设置该属性值为true来解决该问题.该属性的默认值是false.对于 WebLogic、Orion和OC4J...

    传智播客struts2全程学习笔记

    传智播客struts2开源框架全程跟踪学习笔记,可以有效的提高对struts2框架的新认识和使用,更有效的提高开发效率!

    Struts2入门教程(全新完整版)

    org.apache.struts2.dispatcher.ServletActionRedirectResult 16 plainText 16 显示源文件内容,如文件源码 16 org.apache.struts2.dispatcher.PlainTextResult 16 freemarker 16 处理FreeMarker模板 16 org.apache....

    plexus-sec-dispatcher-1.3.jar

    plexus-sec-dispatcher-1.3.jar

    Struts2_s2-016&017&ognl2.6.11_patch漏洞补丁

    &lt;bean type="org.apache.struts2.dispatcher.mapper.ActionMapper" name="myDefaultActionMapper" class="com.struts2.MyDefaultActionMapper" /&gt; &lt;constant name="struts.mapper.class" value=...

    Struts2上传所需jar包

    by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the ...

    struts2配置2.5版

    &lt;?xml version="1.0" encoding="UTF-8"?... org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter &lt;!-- 拦截所有的url --&gt; &lt;filter-name&gt;struts2 &lt;url-pattern&gt;/* &lt;/web-app&gt;

    SSH2报错xception starting filter struts2

    严重: Exception starting filter struts2 java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

Global site tag (gtag.js) - Google Analytics