tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nils O. Selåsdal" <>
Subject Re: Preventing System.exit(0)
Date Mon, 30 Jul 2001 18:15:56 GMT
On Monday 30 July 2001 04:33 pm, you wrote:
> At 06:24 AM 7/30/2001, you wrote:
> >Is it possible to configure Tomcat to avoid shutdown
> >in case the jsp page contains the code:
> >
> ><% System.exit(0); %>
> Java SERVER pages are server-side code. Why is having
> a system object issue an exit method an issue for you?
> Do you plan on having your server run black box code?
Say he invites his friends, the school, whatever, to put servlets/jsp pages
on his server. Its nice to have some security there , to prevent the next 
ass**** to put in a System.exit(...) and thereby stopping the entire server.
Or it might be that other software needs to be used, and someone put in a 
system.exit there in a try/catch block ( I experienced that..).
You can install a security manager to prevent this, I dont remember excactly 
how i did that, but its pretty easy, and can be found in the book
'Core Java 2 - Advanced Features' I think sun also have some tutorials on 
Nils O. Selåsdal

View raw message