tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Evans <>
Subject Changing root webapp
Date Tue, 21 Nov 2000 16:22:39 GMT
In the default tomcat build there is a ROOT webapp which maps to /.  Now I
would like to map the pages and servlets in ROOT to some other path and have a
webapp of my own which handles /.

I tried something like this in server.xml:

        <Context path="/root" 
                 trusted="true" > 

	<!-- Main applications and servlets -->

        <Context path="" 
                 trusted="true" > 

In other words, /root will map to the tomcat home page, etc.  It works fine
except of course my main web app is loaded twice: once when server.xml is read
and once at autosetup time.  AutoSetup scans the webapps directory, finds
"main" and because there isn't a /main context, loads the context again.  This
means that my load-on-startup servlets get loaded twice.

Is there a better way of doing this?


View raw message