You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Henrik Skafsgaard Larsen <hs...@gandium.com> on 2001/07/30 15:24:45 UTC

Preventing System.exit(0)

Is it possible to configure Tomcat to avoid shutdown
in case the jsp page contains the code:

<% System.exit(0); %>

med venlig hilsen / kind regards
Henrik Skafsgaard Larsen




Re: Preventing System.exit(0)

Posted by "Nils O. Selåsdal" <no...@frisurf.no>.
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 
this. http://java.sun.com
-- 
Nils O. Selåsdal

Re: Preventing System.exit(0)

Posted by Tim O'Neil <ti...@xythos.com>.
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?


Re: Preventing System.exit(0)

Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Henrik Skafsgaard Larsen at hsl@gandium.com wrote:

> Is it possible to configure Tomcat to avoid shutdown
> in case the jsp page contains the code:
> 
> <% System.exit(0); %>

Yep... Run it in a sandboxed environment with a Security Manager...

    Pier