2009/12/9 steflik <stef...@binghamton.edu>

>
> I'm teaching a Web Programming course and am using Tomcat 6 for the
> servlet/jsp portion of the course. I have created a context for each
> student
> in the server.xml file and it seems to work pretty good but if a student
> modifies the web.xml file in their application I have to restart the sever
> before it takes effect. Is there a way to configure Tomcat so that changes
> in a users web.xml file will be automatically sensed by the server and take
> effect immediately?
>
> Dick, I think others have commented on creating separate context files and
adding watched resources.  I'll just add the point that if I know student
code, it's going to be buggy.  This could be a bigger problem than in many
web development environments.  All the webapps in a servlet container run in
the same JVM, and they're not defended from each other.  If someone runs the
JVM out of heap, it's gone for everyone; if a request runs forever, that
thread's locked until the server restarts; if someone puts if
(errorCondition) { System.out.println("Oops, I can't carry on from here");
System.exit(1); } then the server will suddenly stop.  Yes, you can fix the
last one of these with a security manager, but there really isn't any way of
defending against buggy student code.

If you're comfortable that you can survive under those circumstances, go for
it!

- Peter

Reply via email to