.war 文件未部署在 tomcat 服务器 7.0 上

发布于 2024-11-24 02:43:49 字数 618 浏览 1 评论 0原文

I have two queries which I am detailing below:
I installed tomcat 7.0 on my ubuntu machine 11.04.
1. .war file not deployed
When I start tomcat through terminal it works fine and I am able to see the tomcat webpage at http://localhost::8080/. After that I try to deploy a war file ps.war which I copy into the webapps folder inside the tomcat installation directory. And then I restart the server but get the same 404 error even when the .war has been extracted to a ps folder by tomcat.
2. Not running through eclipse
when I open it through eclipse then it shows in eclipse console that the server is started and synchronized but does not run any service and give HTTP 404 eroor. Also in this case, When I open a browser window then I get same 404 error at http://localhost::8080//

Please help me put as I am quite stuck at this moment and not able to run the web services any further. Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

缺⑴份安定 2024-12-01 02:43:49

@ezile 我可以理解第一个查询 .war 文件有错误,这就是为什么你无法通过浏览器获取它。
但对于第二个查询解决方案,我如何接受制作正确的 .war 文件使 http://localhost:8080 在 eclipse 中运行...

我问这个问题为我有同样的(第一和第二)困难!

@ezile i can understand for the first query that .war file was faulty thats why you were unable to get it through the browser..
but for second query solution how can i accept that making a correct .war file made http://localhost:8080 running in eclipse...

I am asking this question as i am having the same (first and second) difficulty !!

避讳 2024-12-01 02:43:49

您的意思是在 URL 中的端口号之前添加两个冒号吗?应该只是一个吧http://localhost:8080

接下来,在 Tomcat 安装目录中,有一个名为 logs 的目录,其中包含一些日志文件,这些文件将提供比 更详细的信息。您在浏览器中看到的 >404 消息。

Did you mean to have two colons in your URL before the port number? It's supposed to just be one. http://localhost:8080

Next, in your tomcat installation directory there is a directory called logs which contains a few log files which will provide more information than just the 404 message you see in your browser.

老街孤人 2024-12-01 02:43:49

我们之前遇到过的另一件需要检查的事情是案例。我发现 WebContent\WEB-INF 大小写错误(即小写)并且 Tomcat 不想获取战争工件。

One other thing to check which we've ran into before is case. I have seen a problem with WebContent\WEB-INF being the wrong case (i.e. lower case) and Tomcat not wanting to pick up the war artifacts.

梦里°也失望 2024-12-01 02:43:49

感谢大家的回复。我解决了这个问题。对于第一部分,我的 .war 文件存在一些问题,这就是它未部署的原因。

其次,在我纠正了我的战争之后,它也自动开始为 Eclipse 工作。

Thanks all for your responses. I solved the problem. For first part there was some problems with my .war file and thats why it was not getting deployed.
For second, after I corrected my war, it automatically started working for eclipse too.

海未深 2024-12-01 02:43:49

就我而言,这是因为 WAR 需要完整路径。

我指定了 localhost:8080/WarFileName ,但这

不起作用。只有当我指定

localhost:8080/WarFileName/src/homepage

(这就是在 war 文件中创建包的方式)时,它才起作用。

In my case it was because the WAR required a full path.

I had specified localhost:8080/WarFileName

Which didn't work. It was only when I specified

localhost:8080/WarFileName/src/homepage

Which was how the packages were created in the war file, that it worked.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文