【问题标题】:Tomcat ran into an infinite loopTomcat 陷入死循环
【发布时间】:2016-04-12 09:12:55
【问题描述】:

我正在使用 Apache Struts2 和 Hibernate 开发应用程序。我正在使用 Apache Tomcat 应用程序服务器。突然我注意到我的服务器一直在打印这些行

WARNING: No configuration found for the specified action: 'addProject' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
Apr 12, 2016 2:30:23 PM org.apache.struts2.components.ServletUrlRenderer warn
WARNING: No configuration found for the specified action: 'addProject' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
Apr 12, 2016 2:30:23 PM org.apache.struts2.components.ServletUrlRenderer warn
WARNING: No configuration found for the specified action: 'studentMailbox' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
Apr 12, 2016 2:30:23 PM org.apache.struts2.components.ServletUrlRenderer warn
WARNING: No configuration found for the specified action: 'studentMailbox' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
Apr 12, 2016 2:30:23 PM org.apache.struts2.components.ServletUrlRenderer warn
WARNING: No configuration found for the specified action: 'addProject' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
Apr 12, 2016 2:30:24 PM org.apache.struts2.components.ServletUrlRenderer warn

在此时间间隔内,我的网页正在运行,但有一些应用程序挂起的迹象。但 2 分钟后,我注意到 tomcat 停止并且浏览器显示

AW,Snap
Something went wrong while displaying this page

请给我一个解决方案。 提前致谢。

【问题讨论】:

  • web.xml有没有错误页面跳槽
  • 请检查您的浏览器是否一直在发送请求(例如有fire bug)
  • @AlirezaFattahi 不,我的 web.xml 中没有任何错误页面缺陷。我不知道如何检查浏览器是否仍在发送请求
  • 安装 firefox install firebug add on 并检查 firebug 上的网络标签

标签: java tomcat struts2


【解决方案1】:

产生此异常可能有任何原因。其中,让我们首先关注可能导致此异常的以下 2 点。

首先检查 struts.xml 文件是否位于项目中的正确位置。因为如果Struts2无法加载struts.xml文件,就会出现这个异常。

其次,不要在struts.xml文件中使用namespace属性,如果你用过的话。

请参考以下链接以更好地理解命名空间: http://struts.apache.org/docs/namespace-configuration.html

【讨论】:

    猜你喜欢
    • 2010-11-09
    • 1970-01-01
    • 2021-05-27
    • 1970-01-01
    • 2019-11-12
    • 2017-03-05
    • 2011-04-14
    • 1970-01-01
    • 2020-05-13
    相关资源
    最近更新 更多