Abhijit
Abhijit

Reputation: 175

Cannot see Tomcat homepage( http://localhost:8080) when starting it from eclipse. But it loads when I start it from tomcat bin directory. Any idead?

Upvotes: 1

Views: 4795

Answers (1)

LoganMzz
LoganMzz

Reputation: 1619

You need to be aware of two directory trees with Tomcat : TOMCAT_HOME and TOMCAT_BASE.

TOMCAT_HOME contains binary related data and can be shared by many running Tomcat instances (it contains jar, dll, exe and other non-contextual data).

TOMCAT_BASE specifies configuration files (ie catalina.properties, server.xml, context configurations), webapp directories and further files such as specific librairies if required.

When running Tomcat from his installation directory: TOMCAT_HOME and TOMCAT_BASE are set to same location. Then, Tomcat serves ${TOMCAT_HOME}\webapps directory. The special ROOT context let serve the root path and by default contains a simple webapp (browse ${TOMCAT_HOME}\webapps\ROOT for more information).

When running Tomcat from Eclipse, Eclipse will setup two directories:

  1. with editable configuration (generally goes under ${WORKSPACE}\Servers\${SERVER_NAME}-conf)
  2. with deployed files from last describe directory, served context configuration, deployed context and some other working files such as log and work directories.

This last directory generally goes under your workspace metadata but you can edit it from the server editor. And Eclipse uses this directory as TOMCAT_BASE. To this directory, Eclipse doesn't deploy the default ROOT webapp neither other default ones (docs, examples, host-manager and manager). If necessary you can add them from the server configuration directory (first one described).

Upvotes: 2

Related Questions