eclipse 在本地主机上发布到 Tomcat v6.0 服务器时出错
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17132650/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error publishing to Tomcat v6.0 Server at localhost
提问by Andry
I wave problem with Tomcat when I try to run a jsf page, I get next error:
当我尝试运行 jsf 页面时,我遇到了 Tomcat 的问题,我收到下一个错误:
Details:
细节:
Publishing the configuration...
Error copying file to C:/Program Files/Apache Software Foundation/Tomcat6.0/backup\catalina.policy: C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\catalina.policy (The system cannot find the path specified)
C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\catalina.policy (The system cannot find the path specified)
Error copying file to C:/Program Files/Apache Software Foundation/Tomcat 6.0/backup\catalina.properties: C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\catalina.properties (The system cannot find the path specified)
C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\catalina.properties (The system cannot find the path specified)
Error copying file to C:/Program Files/Apache Software Foundation/Tomcat 6.0/backup\context.xml: C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\context.xml (The system cannot find the path specified)
C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\context.xml (The system cannot find the path specified)
Error copying file to C:/Program Files/Apache Software Foundation/Tomcat 6.0/backup\server.xml: C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\server.xml (The system cannot find the path specified)
C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\server.xml (The system cannot find the path specified)
Error copying file to C:/Program Files/Apache Software Foundation/Tomcat 6.0/backup\tomcat-users.xml: C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\tomcat-users.xml (The system cannot find the path specified)
C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\tomcat-users.xml (The system cannot find the path specified)
Error copying file to C:/Program Files/Apache Software Foundation/Tomcat 6.0/backup\web.xml: C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\web.xml (The system cannot find the path specified)
C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\web.xml (The system cannot find the path specified)
Who have same error? How to solve it? I try few hours, but no result :(
谁有同样的错误?如何解决?我尝试了几个小时,但没有结果:(
I have switch the location And set Use Tomcat installations but also no result
我已经切换位置并设置使用Tomcat安装但也没有结果
回答by Ciprian Popa
The problem is that if you run Eclipse as normal user, Eclipse doesn't have access to C:\Program Files\Apache Software Foundation.. and doesnt copy the configuration file into backup.. Solution: You have to run Eclipse As Administrator or to set in some way that when you click the Eclipse icon to run Eclipse as Administrator
问题是,如果您以普通用户身份运行 Eclipse,Eclipse 无权访问 C:\Program Files\Apache Software Foundation.. 并且不会将配置文件复制到备份中.. 解决方案:您必须以管理员身份运行 Eclipse 或以某种方式设置,当您单击 Eclipse 图标以管理员身份运行 Eclipse 时
回答by Nags
Just Close your Eclipse . And Start Eclipse as Run As Administrator your problem will be solved. Eclipse doesn't have access to C:\Program Files\Apache Software Foundation.. and doesnt copy the configuration file into backup.
只需关闭您的 Eclipse 。并以管理员身份运行 Eclipse,您的问题将得到解决。Eclipse 无权访问 C:\Program Files\Apache Software Foundation.. 并且不会将配置文件复制到备份中。
To Set Eclipse to run as administrator go to eclipse Right Click on Eclipse Select Properties -->Compatibility -->privilege level -->Select Run this program As Administrator -->apply -->ok then you are all set...
要将 Eclipse 设置为以管理员身份运行,请转到 Eclipse 右键单击 Eclipse 选择属性 --> 兼容性 --> 权限级别 --> 选择以管理员身份运行此程序 --> 应用 --> 确定,然后你就全部设置好了...
And if you want to change this setting for all users then go to eclipse Right Click on Eclipse Select Properties -->Compatibility -->change setting for all users-->privilege level -->Select Run this program As Administrator -->apply -->ok... Thank you..
如果要为所有用户更改此设置,请转到 eclipse 右键单击 Eclipse 选择属性 --> 兼容性 --> 更改所有用户的设置 --> 权限级别 --> 选择以管理员身份运行此程序 -->申请 --> 好的...谢谢...
回答by Abdul Ahad
I had a similar problem in Tomcat 7.0 and Eclipse Mars. Restarting Eclipse as Administrator resolved the issue.
我在 Tomcat 7.0 和 Eclipse Mars 中遇到了类似的问题。以管理员身份重新启动 Eclipse 解决了该问题。
回答by Vivek Goel
Your Eclipse is trying to write into the "Program Files" folder, which is protected by default by the Windows operating system.
您的 Eclipse 正在尝试写入“Program Files”文件夹,该文件夹默认受 Windows 操作系统保护。
The solution:
解决方案:
Navigate to the "Program Files" folder. Right-click on the "Apache Software Foundation" folder. Click on Properties. Go to the security tab. Click on "Edit...". Select "Users" in the "Names of groups or users" listbox. In the other "Permissions for users" listbox, check "Full Control". Click Apply/OK.
导航到“程序文件”文件夹。右键单击“Apache Software Foundation”文件夹。单击属性。转到安全选项卡。单击“编辑...”。在“组名或用户名”列表框中选择“用户”。在另一个“用户权限”列表框中,选中“完全控制”。单击应用/确定。
回答by darijan
Put Tomcat in a folder withoutempty spaces in a the path. So:
将Tomcat放在路径中没有空格的文件夹中。所以:
C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup
Shoud be something like:
应该是这样的:
C:\Tomcat\backup
回答by biniam
There are two installation kinds of Tomcat. 1. Windows Installation file with setup.exe 2. A collection of files without setup.exe
Tomcat有两种安装方式。1. 带有 setup.exe 的 Windows 安装文件 2. 不带 setup.exe 的文件集合
What you should use as a server is the second one (A collection of files without setup.exe). Because it is the one that includes the /backup/ folder and its contents.
您应该用作服务器的是第二个(不带 setup.exe 的文件集合)。因为它是包含 /backup/ 文件夹及其内容的文件夹。
This solved my problem.
这解决了我的问题。
回答by Avadhut Mestri
Double click on server at view..and change the port number
在视图中双击服务器..并更改端口号
回答by Sridhar Ramakrishnan
On windows 8.1 it worked by setting compatibility mode to windows 8.1 and then giving privileges to administrator by going to properties on right click on eclipse.exe and then going to the compatibility.
在 Windows 8.1 上,它的工作方式是将兼容模式设置为 Windows 8.1,然后通过右键单击 eclipse.exe 转到属性,然后转到兼容性来授予管理员权限。
回答by Mhk
Try these 3 methods
试试这3个方法
1) Try deleting the .snap file found in
1) 尝试删除 .snap 文件
yourprojectworkspace.metadata.plugins\org.eclipse.core.resources
yourprojectworkspace.metadata.plugins\org.eclipse.core.resources
2) The most common hiccup is when another web server (or any process for that matter) has laid claim to port 8080. This is the default HTTP port that Tomcat attempts to bind to at startup. To change this, open the file:
2) 最常见的问题是当另一个 Web 服务器(或任何与此相关的进程)声明使用端口 8080 时。这是 Tomcat 在启动时尝试绑定到的默认 HTTP 端口。要更改此设置,请打开文件:
$CATALINA_HOME/conf/server.xml
and search for '8080'. Change it to a port that isn't in use, and is greater than 1024, as ports less than or equal to 1024 require superuser access to bind under UNIX. (Example 8181)
并搜索“8080”。将其更改为未使用且大于 1024 的端口,因为小于或等于 1024 的端口需要超级用户访问权限才能在 UNIX 下进行绑定。(例 8181)
Restart Tomcat and you're in business. Be sure that you replace the "8080" in the URL you're using to access Tomcat. For example, if you change the port to 8181, you would request the URL http://localhost:8181/in your browser.
重新启动 Tomcat,您就可以开始工作了。确保替换用于访问 Tomcat 的 URL 中的“8080”。例如,如果您将端口更改为 8181,您将在浏览器中请求 URL http://localhost:8181/。
3) Open the bin folder which contains the shutdown.bat file residing inside the tomcat directory. Run it, that should solve the port problem.
3) 打开包含位于 tomcat 目录中的 shutdown.bat 文件的 bin 文件夹。运行它,应该可以解决端口问题。