【发布时间】:2012-10-18 10:16:36
【问题描述】:
我在 tomcat server 7 中创建了 java 动态 web 应用程序。当我从 eclipse 运行它时它工作正常。
我通过右键单击项目部署它并通过以下导出对话框导出到tomcat安装的webapp目录并启动tomcat服务器以便我可以访问
http://localhost:8080
但是当我尝试访问时
http://localhost:8080/projectName.
我得到以下错误。
The requested resource (/projectName/) is not available.
我查看了catalina.log 文件。并找到了这些行
SEVERE: Error filterStart
SEVERE: Context [/projectName] startup failed due to previous errors
SEVERE: The web application [/projectName] appears to have started a thread named
[Abandoned connection cleanup thread] but has failed to stop it. This is very
likely to create a memory leak.
进一步使用我的应用程序struts2。我将struts2 jar 添加到WEB-INF/lib 目录。为什么我无法从 war 文件中访问我的应用程序?
【问题讨论】:
-
你在tomcat的server.xml中放条目了吗?
-
你检查过eclipse生成的战争档案了吗?您可以使用 7-zip 之类的存档工具来检查
wars。通常,当您收到Context [/projectName] startup failed due to previous errors时,该消息之前应该有一些堆栈跟踪,您可以检查一下。通常web.xml或servlet/filter/listener初始化中的一些错误会导致这样的错误
标签: java eclipse tomcat web-applications war