This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes doubt regarding servlet exception handling . Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "doubt regarding servlet exception handling ." Watch "doubt regarding servlet exception handling ." New topic
Author

doubt regarding servlet exception handling .

RaviNada Kiran
Ranch Hand

Joined: Jan 30, 2009
Posts: 528
If an exception occurs inside a catch block as shown :



Thanks in advance


If you want something you never had do something which you had never done
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

It seems faster to try it than ask on the web. But I didn't remember off the top of my head so I tried it.


outputs:
Exception in thread "main" java.lang.RuntimeException
at play.PlayTest.main(PlayTest.java:10)
a


So yes, the finally is executed and it is output last.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
RaviNada Kiran
Ranch Hand

Joined: Jan 30, 2009
Posts: 528
Jeanne Boyarsky ,

I want to know when a browser page is shown due to an exception , how the control goes back ??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubt regarding servlet exception handling .
 
Similar Threads
finally block vs normal-out-of-try-catch-scope
navigation problem
How to edit database table in jsf
exeption handling
Doubt in order of exception