2
votes

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.

5

5 Answers

1
votes

@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 !!

0
votes

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.

0
votes

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.

0
votes

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.

0
votes

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.