`
esperanza
  • 浏览: 183375 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

struts标签异常 This is usually caused by using Struts tags without the associated f

阅读更多

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]
 at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
 at org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)
 at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)
 at org.apache.jsp.basicinfo.basicInfo_jsp._jspx_meth_struts_005fform_005f0(basicInfo_jsp.java:122)
 at org.apache.jsp.basicinfo.basicInfo_jsp._jspService(basicInfo_jsp.java:93)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Thread.java:619)

 

web.xml相关配置如下:

  <filter>
   <filter-name>struts2</filter-name>
   <filter-class>
    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
   </filter-class>
 <init-param>
  <param-name>config</param-name>
  <param-value>struts-default.xml,struts-plugin.xml,/config/struts.xml </param-value>
 </init-param>    
  </filter>
  <filter-mapping>
   <filter-name>struts2</filter-name>
   <url-pattern>*.action</url-pattern>
  </filter-mapping>

 

原因是因为过滤器只过滤action结尾的请求

但我在JSP页面中使用了 struts的tag

所以请求不会被struts的过滤器处理

标签也就无法解析

 

修改web.xml即可:

<url-pattern>/*</url-pattern>

 

分享到:
评论

相关推荐

    There is no active transaction解决

    之前一直找原因,最后知道了解决方法,具体请下载源码查看。特别是用到throw的事务中

    flash标签云 3D效果 PHP插件 by weefselkweekje

    This is usually caused by a Flash security feature that affects movies served from another domain as the surrounding page. If your blog is http://yourblog.com, but you have ...

    Senfore_DragDrop_v4.1

    This is caused by a quirk in WinZip; Apparently WinZip doesn't like IDataObject.GetData to be called before IDropTarget.Drop is called. ------------------------------------------- 5. Support and ...

    SSD7 选择题。Multiple-Choice

    (b) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have...

    计算机网络第六版答案

    This document contains the solutions to review questions and problems for the 5th edition of Computer Networking: A Top-Down Approach by Jim Kurose and Keith Ross. These solutions are being made ...

    Error in initialization of native part of the Colorer library. This can be caused by absent net_sf_colorer.dll 报错

    ### Error in Initialization of Native Part of the Colorer Library 在安装 Eclipse Colorer 插件时遇到“Error in initialization of native part of the Colorer library. This can be caused by absent ...

    Caused by: java.net.UnknownHostException: openapi.alipay.com

    Caused by: java.net.UnknownHostException: openapi.alipay.com

    The nominal Fuel Cell Stack voltage is 45Vdc and the nominal pow

    At t = 0 s, the DC/DC converter applies 100Vdc to the RL load (the initial ... The peak voltage of 122Vdc at the beginning of the simulation is caused by the transient state of the voltage regulator. At

    AVG 破解版

    In case the Licensee does not abide by these stipulations, the Licensor shall be entitled to cancel the right of use as provided by this Agreement without prior notice at any time and, effective ...

    dx修复工具

    The simple style can be enabled by following steps: open the file “Settings.ini” under the programme folder (this file can be created manually if there is no such file under the folder); change the...

    微软内部资料-SQL性能优化3

    An isolation level determines the degree to which data is isolated for use by one process and guarded against interference from other processes. Prior to SQL Server 7.0, REPEATABLE READ and ...

    polycom宝利通视频会议软件3.9 2018

    by accepting these terms or by installing, downloading, copying, or otherwise using the SOFTWARE PRODUCT, you agree to be and will be bound by the terms of this Agreement as a condition of your ...

    1604.03049.rar_compressIve sensing_massive MIMO_millimeter wave_

    algorithm can solve the power leakage problem caused by the continuous angles of arrival or departure (AoA/AoD). Simulation results verify that the good performance of the proposed solution.

    servlet2.4doc

    The doFilter method of the Filter is called by the container each time a request/response pair is passed through the chain due to a client request for a resource at the end of the chain. doGet...

    dspguide.pdf

    This book presents the fundamentals of Digital Signal Processing using examples from common science and engineering problems. While the author believes that the concepts and data contained in this ...

    Pattern and Security Requirements(Springer,2015)

    This book focuses on how to mitigate these threats by using security standards and provides ways to address associated problems faced by engineers caused by ambiguities in the standards. The security...

    Caused by: android.system.ErrnoException: write failed: ENOSPC (

    ### 错误解析:Caused by: android.system.ErrnoException: write failed: ENOSPC (No space left 在Android开发过程中,可能会遇到“Caused by: android.system.ErrnoException: write failed: ENOSPC (No space ...

    the effect of voltage dips oninduction motors

    Voltage depressions caused by faults on the system affect the performance of induction motors, in terms of the production of both transient currents and transient torques. It is often desirable to ...

    python+selenium

    However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for...

    Delivery with docker and jenkins

    However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for...

Global site tag (gtag.js) - Google Analytics