Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting tomcat in eclipse vs command line

Tags:

eclipse

tomcat

I am using tomcat 6 and when I start it from the command line the application it's running works fine, but when I start tomcat from eclipse (I added it as a server in eclipse) I get a 404 error when I try to run the application in my browser. Any ideas why this is?

like image 677
azrosen92 Avatar asked Aug 14 '12 15:08

azrosen92


1 Answers

By default, when you reference an existing Tomcat instance in Eclipse, only its engine is been used. All already-deployed webapps in Tomcat's /webapps folder are ignored. You seem to expect that they are also accessible when you start Tomcat from inside Eclipse.

You need to configure the Tomcat server reference in Eclipse to set Server Locations to Use Tomcat installation instead of (default) Use workspace metadata. Double click the Tomcat server entry in Servers view to edit it.

enter image description here

This way, everything which is deployed to Tomcat, outside control of Eclipse, will also be available when you start Tomcat from inside Eclipse.

like image 171
BalusC Avatar answered Oct 01 '22 18:10

BalusC