poterban
为国读书
2012-09-22 20:44
采纳率: 33.3%
浏览 272
已采纳

struts2只对于chrome报错的问题

先上报错代码,很简单,就是没有引用标签的一样的报错:

 

[Log] 2012-09-22 20:42:00,256 - WARN  -552225 [http-80-1] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.warn(CommonsLogger.java:45) - Could not find property [org.apache.catalina.jsp_file]
 2012-9-22 20:42:00 org.apache.catalina.core.ApplicationDispatcher invoke
严重: Servlet.service() for servlet jsp threw exception
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.web._404_jsp._jspx_meth_s_005fbean_005f0(_404_jsp.java:307)
    at org.apache.jsp.web._404_jsp._jspx_meth_c_005fif_005f1(_404_jsp.java:252)
    at org.apache.jsp.web._404_jsp._jspService(_404_jsp.java:130)
    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:374)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
    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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:438)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
    at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:424)
    at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:343)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
    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:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Unknown Source)
2012-9-22 20:42:00 org.apache.catalina.core.StandardHostValve custom
严重: Exception Processing ErrorPage[errorCode=404, location=/web/404.jsp]
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. - [unknown location]
    at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
    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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:438)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
    at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:424)
    at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:343)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
    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:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Unknown Source)
Caused by: 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.web._404_jsp._jspx_meth_s_005fbean_005f0(_404_jsp.java:307)
    at org.apache.jsp.web._404_jsp._jspx_meth_c_005fif_005f1(_404_jsp.java:252)
    at org.apache.jsp.web._404_jsp._jspService(_404_jsp.java:130)
    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:374)
    ... 19 more

 

测试代码:

 

<link type="text/css" rel="stylesheet" href="/css/home_left.css" />
<div id="u_pic"></div>

是的 没错 页面精简这样了都还是报上面的错误,并且只有在chrome里面才会报错;各位有谁遇到这中蛋疼的问题或者知道这是什么引起的请赐教下!谢谢!

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

4条回答 默认 最新

  • jinnianshilongnian
    jinnianshilongnian 2012-09-22 20:58
    已采纳

    1、你有一个404.jsp 里边使用了struts2标签 但这个jsp没有走struts2拦截器
    2、即../images/u.png 没有在服务器找到 404造成的

    点赞 评论
  • zx527291227
    zx527291227 2012-09-22 21:32

    [url]http://blog.csdn.net/icejadelove/article/details/4659614[/url]

    可以参考下在这个,可能是你web.xml配置忘配置了。

    点赞 评论
  • hz020815
    hz020815 2012-09-23 15:17

    1、你有一个404.jsp 里边使用了struts2标签 但这个jsp没有走struts2拦截器
    2、即../images/u.png 没有在服务器找到 404造成的

    点赞 评论
  • weixin_42513351
    weixin_42513351 2012-09-23 20:43

    你的struts-cleanup对应的是.action ,但Struts2却对应/

    点赞 评论

相关推荐