zoukankan      html  css  js  c++  java
  • The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. 异常

    异常信息如下:

          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]

    解决办法:

        struts2的标签已经引入了,查询后归纳了以下几种方法:
    1.将web.xml下的struts2过滤器的过滤方式从.action改为/*;不过这种方式自己感觉不太好,应该这样默认就将所有的进行了过滤,可能会对有些应用带来麻烦,例如:fck的配置

    2. 修改Test.jsp 文件,不使用 struts 的标签

    3.就是在web.xml配置文件中再添加一个filter:

    1 <filter-mapping>
    2       <filter-name>struts2</filter-name>
    3       <url-pattern>*.jsp</url-pattern>
    4   </filter-mapping>
    5   <filter-mapping>
    6       <filter-name>struts2</filter-name>
    7       <url-pattern>*.action</url-pattern>
    8   </filter-mapping>
  • 相关阅读:
    02 序列模型问题
    02 序列模型问题
    04 电路交换
    31 路由算法.md
    NumPy入门教程
    有穷自动机
    上下文无关语法
    基本乐理
    正则表达式
    【OpenCV入门教程之七】 玩转OpenCV源代码:生成OpenCV工程解决方案与OpenCV源码编译(转)
  • 原文地址:https://www.cnblogs.com/sunfie/p/5438709.html
Copyright © 2011-2022 走看看