This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception handling problems
 
Similar Threads
Unable to Catch SocketException
How to catch exception thrown from ejbStore
Help : Servlet Service Method
POSt button on JSP opening New session
Socket Exception in servlet ??