RE: application unavailable
Hi, 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. Alright, have fun with it, since you seem to have the time and desire to tackle it ;) Two disagreements I have, though: - It won't necessarily be easy to tell which one of your 100 students has loaded malicious code (and it might be entertaining to see what the teacher and other students do while you're searching for the culprit) - I strongly disagree with the above quoted statement: tomcat makes it TRIVIAL to setup one server per user. You have numerous options, including the User Web Applications listener (see the Host config page), CATALINA_BASE (see section 4 of RUNNING.txt in the root directory of your distro: this one is probably more perfect for you), or completely separate tomcat installs which can be done remotely and silently. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: application unavailable
Howdy, If I try to start up a web application and there's an error in web.xml, the tomcat server marks the application unavailable. Even after fixing the problem, I can't seem to make the application available until restarting the tomcat server. I'm sure there must be *some* file I can erase, or some tweak I can make to make it work without restarting the server. I don't want to have to use the manager application. 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. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: application unavailable
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* Jason. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: application unavailable
wow coool! If I make a mistake, I can get the whole class off. hehe:). -Original Message- From: Jason Keltz [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 1:51 PM To: [EMAIL PROTECTED] Subject: RE: application unavailable 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* Jason. - 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]
RE: application unavailable
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]
RE: application unavailable
Hi Justin, 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? 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]
RE: application unavailable
From: Jason Keltz [mailto:[EMAIL PROTECTED] FAIL - Encountered exception java.lang.IllegalStateException: Container StandardContext[/jas/example2] has not been started Any ideas as to what the problem might be? Maybe a silly question, but did you try the 'start' Ant task instead of the 'reload' task? -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: application unavailable
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]
RE: application unavailable
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