Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

System.exit() in servlet

 
Durga Krishna
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64980
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many production servers will run with a SecurityManager in place, in which case that operation is usually not permitted.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that doesn't make it a good idea to use it though
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic