【问题标题】:Tomcat 404 no found , HttpSessionListenerTomcat 404 未找到,HttpSessionListener
【发布时间】:2018-06-11 14:46:29
【问题描述】:

我在 tomcat 中尝试了一些东西,突然我的所有 JSP 和 Servlet 的状态码为 404。我收到此错误:

11-Jun-2018 17:40:57.528 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [com.example.model.MySessionListener]
java.lang.ClassNotFoundException: com.example.model.MySessionListener
at .....

11-Jun-2018 17:40:57.528 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Skipped installing application listeners due to previous error(s)

我有一个 HttpSessionListener,但发生此错误后我已删除,但错误仍然存​​在(重新启动并删除日志文件后)。如果我删除它,为什么 tomcat 仍然要求 HttpServletListener?我怎么能解决这个问题?

【问题讨论】:

  • web.xml中可能提到过。
  • 不,这很奇怪。我尽可能地删除了它,classses、srcs 和 web.xml。

标签: tomcat


【解决方案1】:

如果您确定没有对 com.example.model.MySessionListener 的引用,请尝试在 tomcat 服务器上执行清理以删除对该类的任何可能引用。还可以尝试删除并重新添加 war 文件。

【讨论】:

  • “干净”是什么意思?我该怎么做?
  • 如果您在 Eclipse 等 IDE 中使用 Tomcat,您可以右键单击您的服务器(在服务器选项卡中)并选择“清理”。您也可以通过命令行查看此处stackoverflow.com/a/29273052/7101216 的步骤。
猜你喜欢
  • 2014-08-27
  • 2018-01-10
  • 2021-09-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-11-03
  • 2018-05-06
相关资源
最近更新 更多