You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by j h <bu...@yahoo.com> on 2002/03/28 07:16:40 UTC

multiple users using tomcat

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
user?

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 crumbs...no problems here following the
trail...thank you in advance..

Joe



__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: multiple users using tomcat

Posted by j h <bu...@yahoo.com>.
Jeff (et al),

Thanks for the direction. 

The students will be learning web apps, so, taking your advice,
and running one tomcat server...


Student "jsmith" will have a home directory of "/home/jsmith/",
and a directory for tomcat webapps as "/home/jsmith/jsp/" 

Soft link in Tomcat's webapps directory
# ln -s  /home/jsmith/jsp  tomcats-home-dir/webapps/jsmith

Now, the  configuration (in server.xml):

        <!-- Tomcat   J Smith Context -->
        <Context path="/jsmith" docBase="jsmith" debug="0"
                 reloadable="true" crossContext="true"/>

Again, thanks Jeff...

Joe




--- Jeff Larsen <la...@qec.com> wrote:
> What is the nature of the instruction? Are you teaching
> the students how to install and configure tomcat or are
> they just going to be creating webapps for tomcat?
> 
> If they are going to be configuring tomcat, then each
> student should have his own tomcat installation directory,
> and (assuming they are all on the same server) each tomcat
> instance will need it's own port. However, you'll need a
> beefy server to handle 75 instances of tomcat.
> 
> If they are just creating webapps. Then you don't really
> need separate instances of tomcat on separate ports. Just
> assign each student his/her own webapp context into which
> their programs will be installed. The same server could
> serve them all. However each context path will need to
> be individually specified in server.xml and have the
> reloadable flag set to true. You may also want to specify
> a custom logger for each context so the students may easily
> track server error messages related to their apps.
> 
> I hope I'm somewhat on the right track for you.  Good Luck,
> 
> Jeff
> 
> 
> ----- Original Message -----
> From: "j h" <bu...@yahoo.com>
> To: <to...@jakarta.apache.org>
> Sent: Thursday, March 28, 2002 12:16 AM
> Subject: multiple users using tomcat
> 
> 
> > 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
> > user?
> >
> > 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 crumbs...no problems here following the
> > trail...thank you in advance..
> >
> > Joe
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Movies - coverage of the 74th Academy Awards�
> > http://movies.yahoo.com/
> >
> > --
> > To unsubscribe:  
> <ma...@jakarta.apache.org>
> > For additional commands:
> <ma...@jakarta.apache.org>
> > Troubles with the list:
> <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
> 



__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: multiple users using tomcat

Posted by Jeff Larsen <la...@qec.com>.
What is the nature of the instruction? Are you teaching
the students how to install and configure tomcat or are
they just going to be creating webapps for tomcat?

If they are going to be configuring tomcat, then each
student should have his own tomcat installation directory,
and (assuming they are all on the same server) each tomcat
instance will need it's own port. However, you'll need a
beefy server to handle 75 instances of tomcat.

If they are just creating webapps. Then you don't really
need separate instances of tomcat on separate ports. Just
assign each student his/her own webapp context into which
their programs will be installed. The same server could
serve them all. However each context path will need to
be individually specified in server.xml and have the
reloadable flag set to true. You may also want to specify
a custom logger for each context so the students may easily
track server error messages related to their apps.

I hope I'm somewhat on the right track for you.  Good Luck,

Jeff


----- Original Message -----
From: "j h" <bu...@yahoo.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, March 28, 2002 12:16 AM
Subject: multiple users using tomcat


> 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
> user?
>
> 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 crumbs...no problems here following the
> trail...thank you in advance..
>
> Joe
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy Awards®
> http://movies.yahoo.com/
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: multiple users using tomcat

Posted by Robert Evans <to...@webdev.apl.jhu.edu>.
Joe,

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"
            directoryName="public_html"
            homeBase="/export/home/"
            userClass="org.apache.catalina.startup.HomesUserDatabase"/>

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....

Bob

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
>user?
>
>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 crumbs...no problems here following the
>trail...thank you in advance..
>
>Joe
>
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Movies - coverage of the 74th Academy Awards®
>http://movies.yahoo.com/
>
>--
>To unsubscribe:   <ma...@jakarta.apache.org>
>For additional commands: <ma...@jakarta.apache.org>
>Troubles with the list: <ma...@jakarta.apache.org>
>
>
>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>