my dog learned polymorphism
The moose likes IDEs, Version Control and other tools and the fly likes tomcat eclipse start issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "tomcat eclipse start issue" Watch "tomcat eclipse start issue" New topic

tomcat eclipse start issue

andy kumar
Ranch Hand

Joined: Jun 08, 2009
Posts: 64

I have tomcat and eclipse installed, when I run tomcat from the startup script in the bin directory everything is fine and I can see the tomcat page at http://localhost:8080.
Now if I run Tomcat from eclipse by right click and run , tomcat starts without any issues but when I point to http://localhost:8080 i do not get the tomcat page. But if I add an sampleapp and try to access it, it works for example http://localhost:8080/sampleapp works but not http://localhost:8080 when I start tomcat from eclipse.

Tom Reilly

Joined: Jun 01, 2010
Posts: 618
When running Tomcat from Eclipse, it does not use all of Tomcat's standard directory structure by default. Here's an excerpt from the Tomcat FAQ:
Tomcat FAQ wrote:How does WTP support separate Tomcat server instances?

Apache Tomcat 4.0 and later operate with paths that are relative to one of two locations. These two locations are known in the Tomcat batch scripts as CATALINA_HOME and CATALINA_BASE. In the Java command that actually runs Tomcat, they appear as catalina.home and catalina.base system properties. The "home" location defines where the binary portion of Tomcat lives. This includes the bin, common, and server directories. The "base" location defines where the configuration and working directories for a Tomcat server instance lives. This includes the conf, logs, shared, webapps, and work directories. Tomcat servers created in WTP will have their "home" location set to the Tomcat installation associated with the Tomcat Runtime selected for the server. The "base" location will default to an internally created directory under the .metadata folder found in your workspace.

So the Tomcat manager web application (tomcat page) is not in the webapps directory that you are running from Eclipse.
andy kumar
Ranch Hand

Joined: Jun 08, 2009
Posts: 64
Thank you for the reply, this solves my doubt.
I agree. Here's the link:
subject: tomcat eclipse start issue
It's not a secret anymore!