You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Alex <al...@squigly.net> on 2004/10/24 21:25:49 UTC

tc5.5 - multiple hosts problem

hey all.

just installed tc 5.5.3 and it works fine no problems out of the box.
now, when i modify the server.xml to add another host, other then
localhost, it sort of works...see, the problem is, i deploy a new war file
to the new 'host' and the only way i can access it is if i go to:

http://meh:8080/meh/index.jsp and not http://meh:8080/index.jsp

so initially, the hosts somewhat works, but for some reason, the path for
the context isn't being picked up...thoughts?

server.xml:

<Host name="localhost" debug="0" appBase="webapps"
 unpackWARs="true" autoDeploy="true"
 xmlValidation="false" xmlNamespaceAware="false">

	<Valve className="org.apache.catalina.valves.AccessLogValve"
	 directory="logs"  prefix="localhost_access_log." suffix=".txt"
	 pattern="common" resolveHosts="false"/>

</Host>

<Host name="sasha.dolgy.com" debug="1" appBase="virtual-hosts/meh"
 unpackWARs="true" autoDeploy="true"
 xmlValidation="false" xmlNamespaceAware="false">

	<Valve className="org.apache.catalina.valves.AccessLogValve"
         directory="logs"  prefix="meh_access_log." suffix=".txt"
	 pattern="common" resolveHosts="false"/>

</Host>


meh.xml (located in $CATALINA_HOME$/conf/Catalina/meh/) :

<Context path="" docBase="meh" reloadable="true">
<!-- empty for now -->
</Context>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: tc5.5 - multiple hosts problem

Posted by Alex <al...@squigly.net>.
 
Thanks for the reply.  Things seem to work now if I have my app as ROOT with
a ROOT.xml.

I've also noticed that tomcat is mysteriously deleting some of my config
files and war files when an internal reload happens (if it sees a file has
changed)  For instance, I renamed 'meh' to ROOT and meh.war disappeared.  

-----Original Message-----
From: Remy Maucherat [mailto:remy.maucherat@gmail.com] 
Sent: 24 October 2004 21:59
To: Tomcat Users List
Subject: Re: tc5.5 - multiple hosts problem



The way defining the context path works has been changed. Since there was
redundant information, the path of the context is now found based on the
deployment file name (= it can be the .xml, the .war or the expanded folder
file name). So here, if you want your context to have the root path, your
.xml should be ROOT.xml, and you should remove the path attribute.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: tc5.5 - multiple hosts problem

Posted by Remy Maucherat <re...@gmail.com>.
On Sun, 24 Oct 2004 15:25:49 -0400 (EDT), Alex <al...@squigly.net> wrote:
> hey all.
> 
> just installed tc 5.5.3 and it works fine no problems out of the box.
> now, when i modify the server.xml to add another host, other then
> localhost, it sort of works...see, the problem is, i deploy a new war file
> to the new 'host' and the only way i can access it is if i go to:
> 
> http://meh:8080/meh/index.jsp and not http://meh:8080/index.jsp
> 
> so initially, the hosts somewhat works, but for some reason, the path for
> the context isn't being picked up...thoughts?

The way defining the context path works has been changed. Since there
was redundant information, the path of the context is now found based
on the deployment file name (= it can be the .xml, the .war or the
expanded folder file name). So here, if you want your context to have
the root path, your .xml should be ROOT.xml, and you should remove the
path attribute.

-- 
xxxxxxxxxxxxxxxxxxxxxxxxx
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
xxxxxxxxxxxxxxxxxxxxxxxxx

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org