aspose file tools*
The moose likes Servlets and the fly likes System.exit() in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "System.exit() in servlet" Watch "System.exit() in servlet" New topic
Author

System.exit() in servlet

Durga Krishna
Greenhorn

Joined: Jul 10, 2006
Posts: 11
hi everybody,

Please tell me what will happen if my servlet is having System.exit();
And aslo plesase tell me how to fix the bug in my module? what is the procedure to follow?
Justin Yao
Greenhorn

Joined: Jun 16, 2006
Posts: 19
Hi,
This method will terminate the currently running JVM, so your sevlet will
be terminated.

Regards
[ July 12, 2006: Message edited by: Yao Gao ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Don't do that.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61241
    
  66

Originally posted by Yao Gao:

so your sevlet will be terminated.


While that's technically true, that's only because the entire server will be shut down.
[ July 12, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41906
    
  63
Many production servers will run with a SecurityManager in place, in which case that operation is usually not permitted.


Ping & DNS - my free Android networking tools app
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
that doesn't make it a good idea to use it though


42
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: System.exit() in servlet