| View previous topic :: View next topic |
| Author |
Message |
luca Guest
|
Posted: Tue May 11, 2004 9:34 am Post subject: System.exit(0) and tomcat |
|
|
Hallo, I just noticed that using System.exit(0) in my app
has the nice effect of stopping tomcat 4!!!
Not very secure, is it?
luca
|
|
| Back to top |
|
 |
Ryan Stewart Guest
|
Posted: Tue May 11, 2004 11:42 am Post subject: Re: System.exit(0) and tomcat |
|
|
"luca" <luca_remove (AT) tin (DOT) it> wrote
| Quote: |
Hallo, I just noticed that using System.exit(0) in my app
has the nice effect of stopping tomcat 4!!!
Not very secure, is it?
Are we talking webapp here? Why would you use System.exit() in a webapp? |
|
|
| Back to top |
|
 |
luca Guest
|
Posted: Tue May 11, 2004 11:59 am Post subject: Re: System.exit(0) and tomcat |
|
|
Ryan Stewart wrote:
| Quote: | Are we talking webapp here? Why would you use System.exit() in a webapp?
|
I detected a misconfiguration I can't do anything about...
luca
|
|
| Back to top |
|
 |
Peter Kirk Guest
|
Posted: Tue May 11, 2004 12:39 pm Post subject: Re: System.exit(0) and tomcat |
|
|
| Quote: | Are we talking webapp here? Why would you use System.exit() in a webapp?
I detected a misconfiguration I can't do anything about...
|
Why not just send a "serious error" page to the client?
|
|
| Back to top |
|
 |
luca Guest
|
Posted: Tue May 11, 2004 12:52 pm Post subject: Re: System.exit(0) and tomcat |
|
|
Peter Kirk wrote:
| Quote: |
Why not just send a "serious error" page to the client?
|
because the library which detects the condition is general-purpose,
not web only. It can be used in any Java program.
luca
|
|
| Back to top |
|
 |
Juha Laiho Guest
|
Posted: Tue May 11, 2004 4:22 pm Post subject: Re: System.exit(0) and tomcat |
|
|
luca <luca_remove (AT) tin (DOT) it> said:
| Quote: | Hallo, I just noticed that using System.exit(0) in my app
has the nice effect of stopping tomcat 4!!!
Not very secure, is it?
|
Not reading documentation, aren't you?
See Security Mgr how-to in Tomcat documentation; it starts by discussing
possibility of someone having System.exit(1) in code that's running
within the servlet container.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
|
|
| Back to top |
|
 |
Ryan Stewart Guest
|
Posted: Tue May 11, 2004 4:25 pm Post subject: Re: System.exit(0) and tomcat |
|
|
"luca" <luca_remove (AT) tin (DOT) it> wrote
| Quote: | Peter Kirk wrote:
Why not just send a "serious error" page to the client?
because the library which detects the condition is general-purpose,
not web only. It can be used in any Java program.
luca
Not if it uses System.exit(), it isn't. The appropriate way to handle errors |
is to throw an Exception.
|
|
| Back to top |
|
 |
Nigel Wade Guest
|
Posted: Wed May 12, 2004 10:22 am Post subject: Re: System.exit(0) and tomcat |
|
|
luca wrote:
| Quote: |
Hallo, I just noticed that using System.exit(0) in my app
has the nice effect of stopping tomcat 4!!!
Not very secure, is it?
luca
|
Why does that make it insecure? A terminated application is very secure ;-)
Tomcat runs in the JVM, if you exit the JVM with System.exit() then Tomcat
terminates. It's a silly thing to do, so don't do it.
--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : [email]nmw (AT) ion (DOT) le.ac.uk[/email]
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
|
|
| Back to top |
|
 |
William Brogden Guest
|
Posted: Tue May 25, 2004 1:06 pm Post subject: Re: System.exit(0) and tomcat |
|
|
On Tue, 11 May 2004 09:34:56 GMT, luca <luca_remove (AT) tin (DOT) it> wrote:
| Quote: |
Hallo, I just noticed that using System.exit(0) in my app
has the nice effect of stopping tomcat 4!!!
Not very secure, is it?
luca
Read the documentation on security or just look at the |
options in catalina.bat. Duh!
Start your tomcat with the -security switch and it will
use catalina.policy file to configure a SecurityManger
this allows you to proscribe in minute detail just what
each application is allowed to do.
Bill
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
|
|
| Back to top |
|
 |
|