Thanks Justin/Wendy, Yes.  Using "start" instead of "reload" works just
fine. Whoops.  I'm new to this.

Yoav -- In terms of running one tomcat server per user -- that's
difficult.  Imagine a class of 100 students (or more) all working on their
programs at the same time.  While a System.exit could cause everything to
a die, a carefully crafted startup script could restart the server again
as well.  While any one student could consistently bring the server down,
I imagine that it wouldn't be hard to track which student was doing it,
and deal with them appropriately (pulling their toe nails off or something
like that).  I've seen many universities deal with the situation
differently -- some doing something like what I'm doing, and others pretty
much telling their students to install the server, pick a port, and go for
it.  I think that if I could run one server, and provide the tools to make
it work well, it would be easier to support than every student running
their configuration separately.  Tomcat definately doesn't make the
process of running one server per user easy, and if it doesn't work, we
can always change our route, but it's an interesting and challenging
problem that I thought might be fun to tackle nonetheless.

Jason.

On Mon, 1 Mar 2004, Justin Ruthenbeck wrote:

> At 01:27 PM 3/1/2004, you wrote:
> >That's exactly the kind of thing I want to do.  However, I just tried to
> >use the manager app to restart my failed "Hello" example.  When the
> >context was up, the reload worked fine.  However, when the context died
> >because of an intentional error in web.xml, I get an error from manager:
> >
> >FAIL - Encountered exception java.lang.IllegalStateException: Container
> >StandardContext[/jas/example2] has not been started
> >
> >Any ideas as to what the problem might be?
>
> When you issue a 'reload' command, you are telling the container to
> remove the specified context, then load it from scratch.  If the context
> isn't already loaded (started), you'll get the error you have
> above.  This is exactly the situation when you try to load the context
> but it errors out because of a busted web.xml.
>
> If a context isn't already loaded, use the manager's 'start' command
> instead of the 'reload' command.  The specifics/signature of the task are
> explained (not surprisingly) in the Tomcat manager documentation:
>
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html#Executing%20Manager%20Commands%20With%20Ant
>
> justin
>
> PS: Hope you're considering Yoav's comment about System.exit() and other
> JVM-level commands.  In just about every situation where multiple users
> are developing, it's adventageous to give each user their own JVM.
>
>
>
> >Thanks..
> >
> >Jason.
> >
> >On Mon, 1 Mar 2004, Justin Ruthenbeck wrote:
> >
> > > At 12:50 PM 3/1/2004, you wrote:
> > > >On Mon, 1 Mar 2004, Shapira, Yoav wrote:
> > > > > >
> > > > > > Don't be so sure ;)  You can use the manager webapp (either
> > > > graphically
> > > > > > or via ant), you can write some custom JMX code in another
> > webapps,
> > > > or
> > > > > > you can restart the server, but there are no other options.
> > > >
> > > >... the problem is that I'm trying to run one tomcat server for a
> > large
> > > >group of students.  I can handle the deploy/undeploy part, but if a
> > > >student makes an error in their web.xml file, which is bound to
> > happen, I
> > > >don't want to have to restart the server.  I'll need to look at a
> > way to
> > > >wrap the reload via the manager application from ant. *sigh*
> > >
> > > You don't need to restart the entire process -- you just need to (as
> > you
> > > mentioned) reload whatever context is unavailable.  Obviously you don't
> > > want to give every student permissions to restart every context, so
> > > that's out of the question.  It sounds like you're considering wrapping
> > > the ant reload with your own framework to check credentials before
> > > issuing the reload command (or something similar)?  If so, I would
> > highly
> > > recommend starting from the tomcat <reload> ant task source code --
> > > you'll find it pretty straight forward to put something like this
> > together.
> > >
> > > justin
> > >
> > >
> > > ______________________________________________
> > > Justin Ruthenbeck
> > > Software Engineer, NextEngine Inc.
> > > justinr - AT - nextengine DOT com
> > > Confidential. See:
> > > http://www.nextengine.com/confidentiality.php
> > > ______________________________________________
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ______________________________________________
> Justin Ruthenbeck
> Software Engineer, NextEngine Inc.
> justinr - AT - nextengine DOT com
> Confidential. See:
> http://www.nextengine.com/confidentiality.php
> ______________________________________________
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to