[英]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?
You need to be aware of two directory trees with Tomcat : TOMCAT_HOME
and TOMCAT_BASE
. 您需要了解Tomcat的两个目录树:
TOMCAT_HOME
和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_HOME
包含与二进制相关的数据,并且可以由许多正在运行的Tomcat实例共享(它包含jar,dll,exe和其他非上下文数据)。
TOMCAT_BASE
specifies configuration files (ie catalina.properties
, server.xml
, context configurations), webapp directories and further files such as specific librairies if required. TOMCAT_BASE
指定配置文件(即catalina.properties
, server.xml
,上下文配置),webapp目录以及其他文件(例如需要时的特定库)。
When running Tomcat from his installation directory: TOMCAT_HOME
and TOMCAT_BASE
are set to same location. 从安装目录运行Tomcat时:
TOMCAT_HOME
和TOMCAT_BASE
设置在同一位置。 Then, Tomcat serves ${TOMCAT_HOME}\\webapps
directory. 然后,Tomcat提供
${TOMCAT_HOME}\\webapps
目录。 The special ROOT
context let serve the root path and by default contains a simple webapp (browse ${TOMCAT_HOME}\\webapps\\ROOT
for more information). 特殊的
ROOT
上下文允许提供根路径,并且默认情况下包含一个简单的webapp(有关更多信息,请浏览${TOMCAT_HOME}\\webapps\\ROOT
)。
When running Tomcat from Eclipse, Eclipse will setup two directories: 从Eclipse运行Tomcat时,Eclipse将设置两个目录:
${WORKSPACE}\\Servers\\${SERVER_NAME}-conf
) ${WORKSPACE}\\Servers\\${SERVER_NAME}-conf
) 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
. Eclipse将此目录用作
TOMCAT_BASE
。 To this directory, Eclipse doesn't deploy the default ROOT
webapp neither other default ones ( docs
, examples
, host-manager
and manager
). 在该目录中,Eclipse不会部署默认的
ROOT
Webapp,也不会部署其他默认的ROOT
Webapp( docs
, examples
, host-manager
和manager
)。 If necessary you can add them from the server configuration directory (first one described). 如有必要,您可以从服务器配置目录(描述的第一个)中添加它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.