从 eclipse-3.5.0 (galileo) 启动 tomcat-6.0.20 导致 404 错误
控制台追着我。有人可以帮忙吗?
悲伤的故事就这样开始了。我的操作系统是ubuntu-9.04。我通过从 .tar.gz包并将其放在/usr/share/tomcat-6.020目录下。
然后我从控制台启动tomcat,一切似乎都很好。本地主机回答了 $CATALINA_HOME/webapps/ROOT/index.html 页面。
下一步是将我的 tomcat 放入 eclipse 的服务器列表中。因此,我进入了首选项>;服务器>运行环境>添加> Apache Tomcat v6.0(这里我还浏览到我的tomcat并将JVM从JRE更改为JDK)。最后,我将我的服务器添加到服务器列表中。
因此,配置完所有内容后,我从 eclipse 启动 Tomcat,打开浏览器并请求 localhost。 突然404。尽管Eclipse 的控制台没有显示任何错误。
有人遇到过同样的问题吗?
Console dogs me. Can anybody help?
The sad story starts like this. My OS is ubuntu-9.04. I installed tomcat-6.0.20 by extracting it from .tar.gz package and put it under the /usr/share/tomcat-6.020 directory.
Then I started tomcat from console, and everything seemed to be fine. localhost answered with the $CATALINA_HOME/webapps/ROOT/index.html page.
The next step was to put my tomcat in the eclipse's servers list. So, I went to Preferences > Server > Runtime Environment > Add > Apache Tomcat v6.0 (here I also browsed to my tomcat and changed JVM from JRE to JDK). Finally, I added my server to the Servers list.
So, having everything configured, I started my tomcat from the eclipse, opened a browser and asked for localhost. 404 all over sudden. Despite the fact that the eclipse's console has shown no errors.
Has anybody encountered the same problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
我通过从服务器视图中删除当前服务器配置并再次添加它来修复“无法加载服务器配置”问题。
I fixed the "Could not load server configuration" problem by deleting the current server configuration from the Servers View and adding it again.
打开您的 Tomcat 设置(在 Eclipse 的“服务器”视图中双击或 F3 您的 Tomcat 实例):
Open your Tomcat settings (double click or F3 on your Tomcat instance in 'Servers' view in Eclipse):
我和卡利斯在一起。我在使用 Tomcat 5.5 的 Eclipse 3.6 中遇到此错误:“无法在 /Servers/Tomcat v5.5 服务器上加载服务器配置。配置可能已损坏或不完整。”在尝试了 20 分钟的每个设置并得到相同的错误后,我删除了服务器,重新添加它,它在大约 90 秒内运行,没有任何更改。
I'm with Carlisg. I had this error in Eclipse 3.6 with Tomcat 5.5: "Could not load server configuration at /Servers/Tomcat v5.5 server. The configuration maybe corrupt or incomplete." After playing around with every setting for 20 minutes and getting the same error, I just deleted the server, re-added it and it worked in about 90 seconds with no changes.
是的,emanemos 是对的,我今天尝试了一下,立即就可以使用了。在eclipse中创建一个新项目,我创建了一个Dynamic web项目。创建一个新服务器,选择您的 apache 版本作为服务器类型。然后在此项目空间中创建页面和资源。我在 Webcontent 中创建了 index.html 并指向 http://localhost:8080/Trial/ 我可以请参阅我的index.html。 (审判是我的项目的名称)。
yes emanemos is right, I tried it today and got it working instantly. Create a new project in eclipse, I created a Dynamic web project. Create a new server, choose your apache version as the server type. Then create your pages and resources in this project space. I created index.html in Webcontent and pointed to http://localhost:8080/trial/ and I can see my index.html. (trial is the name of my project).
在 Windows Vista 32 中,我这样修复,在“服务器位置”选择中,使用 Tomcat 安装(控制 tomcat 安装),对于部署路径,我添加了我的 tomcat webapp 目录。'C:\apache-tocat- 6.0.26-windows-x86\apache-tomcat-6.0.26\webapps'。使用默认配置路径 /Servers/Tomcat v6.0 Server at localhost-config ,它工作得很好。
In windows vista 32 I fixed like this, In 'serverlocation' selected Use Tomcat installation(takes control of tomcat installation) and for deploy path I added my tomcat webapp dir.'C:\apache-tocat-6.0.26-windows-x86\apache-tomcat-6.0.26\webapps'. With default configuration path /Servers/Tomcat v6.0 Server at localhost-config, it just works fine.
我遇到了同样的问题,并按照以下步骤解决了它:
在服务器视图上,右键单击服务器(本地主机上的 Tomcat 6.0 服务器)
在菜单选项中单击“打开”,这将打开一个包含服务器所有配置的菜单。
在“服务器位置”选项卡上,您必须选择“使用 Tomcat 安装(控制 tomcat 安装)”选项。
不要忘记检查部署路径。
我认为eclipse配置在Tomcat上有问题,必须使用tomcat安装配置。
I had the same problem and solved it following these steps:
On the Server View, right click on the server (Tomcat 6.0 Server at Localhost)
in the menu options click "Open", this opens a menu with all the configurations for the server.
On tab "Server Locations" you must select the option "Use Tomcat Installation (takes control of tomcat installation)".
Do not forget to check the Deploy path.
I think there is a problem with eclipse configuration over Tomcat and it must use the tomcat installation configuration.