This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Exception handling problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Exception handling problems" Watch "Exception handling problems" New topic
Author

Exception handling problems

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I have made a simple servlet. In this servlet I am accepting a username and password from the client. When the client clicks on his submit button, after the request is sent to the servlet the user presses stop button, I get a SocketException in the servlet. I am using post method. I have also tried by putting the whole post method into try catch but yet I could not catch this exception.
thanx
nitin
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
The reason for this is where the Exception is occurring, In most Servlet serving applications (Such as the Oracle Application Server, WebLogic etc.) Certain RunTime exceptions occur in the Servlet runner and not the actual Servlet itself. Because of this, You are not able to catch the exception in your Servlet. You can try and contact the developer of your Server and see if there is a work around or method.
Hope this helps


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
 
GeeCON Prague 2014
 
subject: Exception handling problems