tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Villar <john.vil...@florhard.com>
Subject Re: Renaming the ROOT directory ?
Date Sat, 18 Sep 2004 12:13:18 GMT
Your path attribute should have "/" and not "". Docbase should be (for 
your case, i will explain why it is wrong) "webapps/my_app". This is a 
bad configuration, because you're telling to your host that its root dir 
is within the root of another host. better approach IMHO: create one 
"webapps" dir for every virtual host, say "webapps2" and "webapps3" 
(keeping one host with the default webapps) and point the 2nd host to 
"webapps2" and your 3rd host to "webapps3", then create for every host a 
default context with <Context path="/" docBase="my_app"/> and voila, you 
have 3 virtual hosts each one with its default context.

John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com



Jean-Paul Le Fèvre escribió:

>I don't understand how to specify a default context.
>I'm currently working with tomcat-5.0.27 and my server
>is supporting 3 virtual hosts.
>
>In the config file (server.xml) I declare a default context
>with :
>     <Context path = "" docBase = "my_app" ...
>
>The directory 'my_app' is available in the 'webapps' directory.
>Depending on the case it is directly copied or extracted from a
>war file.
>However when the application is deployed a 'ROOT' directory is automatically
>created. Its content duplicates the one in 'my_app'.
>
>When I update something in 'my_app' the copy in 'ROOT' is not synchronized
>and the 2 directories become different.
>
>The problem is that tomcat is actually serving the content of 'ROOT'
>and not the 'my_app's one. As a result I've lost a lot of time trying to
>figure out why my jspages did not take into account my modifications.
>
>- Is there a way to get rid of the 'ROOT' directory.
>- Is it possible to specify unambiguously the name of the default directory.
>
>  
>


Mime
View raw message