tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Evans <>
Subject Re: multiple users using tomcat
Date Tue, 02 Apr 2002 12:58:57 GMT

I have to do this at JHU for some Java classes.  The best I've figured 
it out, you use a Listener that designates a certain directory as a 
"home" directory for web apps.  It iterates through all of the 
directories in the "home" directory, and builds webapps for any that 
contain the WEB-INF/web.xml structure (your student accounts).  This 
sounds complex, but all you have to do is have the following in your 
server.xml file:

      <!-- Define the default virtual host -->
      <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">

      <!-- Local Staff web applications for webdev -->
      <Listener className="org.apache.catalina.startup.UserConfig"

I left the definition of the virtual host in as a guide to where to put 
the Listener in the server.xml file.  This particular configuration 
looks for all directories in the /export/home directory that are 
configured to be web applications, and automatically sets up the web app.

The only down side is that the server has to be restarted when new 
directories are added, since the server builds the web-apps  as it 
starts up.  If anybody knows how to get around this limitiation, I'd 
love to know....


j h wrote:

>Hi there...
>I have a server that I need to have 20-75 separate
>student users accessing tomcat.
>Do I set it up so each user has a separate directory
>that they can write to, under the directory that
>tomcat uses?
>Or possibly run tomcat on a separate port for each
>Sorry to say, the instructor wanted each student to
>run tomcat on a win 95/98/nt machine, and he has no
>idea how to set this up, so it's on me. 
>I have perused many hundreds of messages on this 
>newsgroup with nothing to steer me. I've also looked
>at the documentation and scoured the jakarta
>homepage for help. I'm sure it's in the server.xml
>file, but I'm stumped. 
>Please send problems here following the
>trail...thank you in advance..
>Do You Yahoo!?
>Yahoo! Movies - coverage of the 74th Academy Awards®
>To unsubscribe:   <>
>For additional commands: <>
>Troubles with the list: <>

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message