top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

Can I use System.exit() in servlets?

+2 votes
65 views
Can I use System.exit() in servlets?
posted Oct 22, 2015 by Shyam

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

The JVM running the servlet container would terminate, so, yes. Well, System.exit() will terminate the current running JVM. So it is likely that the code written in servlet containers' addShutdownHook will be triggered. No you cannot because it will throw a security exception.

answer Oct 23, 2015 by Karthick.c
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...