Reputation: 41939
Given a complete TOMCAT directory, how can I determine where my WAR will be hosted?
My WAR's been exploded, but I'm not sure what to type in the browser to access it.
Note that I'm ssh'd onto another machine, so I assume that forwarding's been enabled.
Here's some of my $TOMCAT_HOME/conf/server.xml:
<Server port="20310" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Service name="Catalina">
<Connector port="60310" protocol="AJP/1.3" redirectPort="8443" packetSize="65536"/>
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" unpackWARs="true" autoDeploy="true" appBase="webapps"/>
</Engine>
</Service>
<Service name="App">
<Connector port="45310" protocol="AJP/1.3" packetSize="65536"/>
<Engine name="App" defaultHost="localhost">
<Host name="localhost" unpackWARs="true" autoDeploy="true" appBase="app"/>
</Engine>
</Service>
</Server>
Thanks.
Upvotes: 0
Views: 78
Reputation: 618
Tomcat hosts web applications and does not have a single DocumentRoot in the same way that Apache HTTPD does. Given the following location:
/path/to/tomcat/webapps
and a standard server.xml containing:
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" unpackWARs="true" autoDeploy="true" appBase="webapps"/>
</Engine>
then the default application (which uses the special name 'ROOT'), will be here:
/path/to/tomcat/webapps/ROOT
and will publish itself on:
http://<ip-address>:<connector-port>/
When there's another named application deployed:
/path/to/tomcat/webapps/myapp
it will be published here:
http://<ip-address>:<connector-port>/myapp
In your case you have configured two services, two connectors and two hosts, so you have two appBase locations, in turn you have two default applications:
/path/to/tomcat/webapps/ROOT
/path/to/tomcat/app/ROOT
and they are available on the AJP ports 60310 and 45310.
That's where we stop, because you haven't told us anything about the Apache HTTPD config and whether you've configured a reverse proxy to send traffic to Tomcat.
Why are you using Apache HTTPD?
Upvotes: 1
Reputation: 15664
I think you should find it under $TOMCAT_HOME/webapps/
, because this is where I put my webapp for running on Tomcat Server 6.0
Upvotes: 1