我正在使用 Tomcat v7.0 在 eclipse 中开发我的 Web 应用程序,一切都很好。
但是今天突然我不能再在服务器上运行我的项目了。
我像往常一样:
右键单击我的项目->Run As->Run on Server,然后选择在我的 Tomcat 服务器上运行它,但出现此错误:
'Publishing to Tomcat v7.0 Server at localhost...'
has encountered a problem
Removing obsolete files from server...
Could not clean server of obsolete files: Premature end of file.
Premature end of file.
有谁知道我该怎么做吗?
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>LinkedIn</display-name>
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
</web-app>
最佳答案
我遇到了类似的问题,但不是 java.lang.NullPointerException
。
对我来说唯一有用的是:
- 右键单击服务器上的服务器实例查看 -> 属性 -> 切换位置;
- 从服务器上删除所有已发布的项目;
- 再次右键单击服务器并进行两项清理。
希望对您有所帮助!
关于java - Tomcat v7.0 停止在本地主机上运行我的项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23288991/