0

I installed tomcat on my ubuntu. When i create a new Dynamic Web Project I choose the tomcat 7 server. When I launch my page it works on localhost:8080/app/page but if I go on localhost:8080 it give me a 404 error.

If i start tomcat server with an external script like /etc/init.d/tomcat start, it works but I cannot launch my app because it says that the port 8080 is already occupied (by the other instance of tomcat).

I'm confused on how set everything, I would start tomcat at boot and link that instance for my apps.

Can you explain how I hato to do?

thebestneo
  • 137
  • 1
  • 6

2 Answers2

0

So, I am not against "Starting/Stopping" the server from eclipse but to keep it simple, I think you can stop the server from eclipse (Click on windows/showview/Servers and then stop the server). Then I think you should not get an error if you start tomcat again from external script. Then you can right click on your dynamic web project in eclipse and export it as a war file inside tomcat-install--dir/webapps. Where your web application is available (on which context) depends on the web.xml file. If you need further info on this plz let me know.

htulsiani
  • 344
  • 1
  • 8
0

Open the server configuration in the Servers tab on Eclipse. On "Server Locations", mark "Use Tomcat installation".

EDIT: to be more precise, this will make Eclipse "take control" of your Tomcat folder. So it will not just make a replica on eclipse .metadata and deploy only your apps on it; instead it will be like if you ran bin/startup, but using some of the configuration defined on Servers view. So if you go localhost:8080 you will see the Welcome page, because /ROOT is now started by Eclipse.

vitorrrr
  • 70
  • 7
  • Try this: http://stackoverflow.com/questions/1012378/eclipse-server-locations-disabled-and-need-to-change-to-use-tomcat-installation – vitorrrr May 04 '12 at 15:39