简体   繁体   English

将Tomcat服务器部署到Eclipse时出错

[英]Error while deploying the Tomcat server into Eclipse

I am trying to deploy Tomcat into the eclipse. 我正在尝试将Tomcat部署到Eclipse中。 While doing so, I am getting the following message: 这样做时,我收到以下消息:

Deployment failure on Tomcat 6.x. Tomcat 6.x上的部署失败。 Could not copy all resources to C:\\Program Files\\Apache Software Foundation\\Tomcat 6.0\\webapps\\web. 无法将所有资源复制到C:\\ Program Files \\ Apache Software Foundation \\ Tomcat 6.0 \\ webapps \\ web。 If a file is locked, you can wait until the lock times out to redeploy, or stop the server and redeploy, or manually remove the deployment at C:\\Program Files\\Apache Software Foundation\\Tomcat 6.0\\webapps\\web 如果文件被锁定,则可以等到锁定超时后重新部署,或者停止服务器并重新部署,或者在C:\\ Program Files \\ Apache Software Foundation \\ Tomcat 6.0 \\ webapps \\ web中手动删除部署

Can any one help me out? 谁能帮我吗?

In my experience, this error usually means that eclipse wants to delete a file or directory and windows won't let it. 以我的经验,此错误通常表示eclipse想要删除文件或目录,而Windows不允许这样做。 This is usually because tomcat is still running, or there is a command prompt or explorer window open in the deployment directory or one of its subdirectories. 这通常是因为tomcat仍在运行,或者在部署目录或其子目录之一中打开了命令提示符或资源管理器窗口。

Use Windows Task Manager to verify that tomcat is not still running, and make sure you don't have any command prompts or explorer windows open in the deployment directory. 使用Windows任务管理器来验证tomcat仍未运行,并确保在部署目录中没有打开任何命令提示符或浏览器窗口。

也许您没有对Tomcats程序目录的写访问权?

Have you tried to copy tomcat in a different location. 您是否尝试过在其他位置复制tomcat。 It could be that the spaces in your tomcat path causing these problems. 可能是您的tomcat路径中的空格导致了这些问题。 Choose something like c:\\tomcat6* 选择类似c:\\ tomcat6 *的东西

Stop the tomcat server, undeploy your app by choosing ' add and remove projects', go to webapps folder, delete the folder 'web', redeploy your app and restart tomcat server. 停止tomcat服务器,通过选择“添加和删除项目”取消部署您的应用程序,转到webapps文件夹,删除文件夹“ web”,重新部署您的应用程序,然后重新启动tomcat服务器。 That should do it. 那应该做。

This is generally happening when You are Importing project from somewhere else or Checking out from SVN. 当您从其他地方导入项目或从SVN签出时,通常会发生这种情况。 The solution is in Eclipse jar file referenced in the project to re-add it again on the line, the basic reason is that the jar file does not exist, there project information, project classpath files still do not exist jar file references. 解决的办法是在项目中引用的Eclipse jar文件中重新添加它,就行了,其根本原因是jar文件不存在,存在项目信息,项目类路径文件仍然不存在jar文件引用。

You can right-point project name, select Properties, select Java Build Path, select Libraries are a remove all items in the jar, and then point to "add jars", add to the mix jar file in the project, again deploy to normal. 您可以右键单击项目名称,选择“属性”,选择“ Java Build Path”,选择“ Libraries are a remove the jar”中的所有项目,然后指向“添加jars”,添加到项目中的mix jar文件中,再次部署到普通。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM