if i am giving a page redirection inside a try block and also in finally block which page will come ?whether the one given inside the try block or finally block?
It will execute the first one that it comes to.So if all is well then it will redirect according to the redirect in the try statement.If an exception is thrown before it is reached then it will redirect according to the finally statement.
So christopher,finally block will always run according to java.Only exception case is System.exit().So i think it will be the filly b;lock which will be excecuted.What did u think?So my answer is second one.
It might depend on your web-app but tomcat will execute the first redirect that it comes across.You are right that the finally block will execute but I imagine this would throw an error as you can't redirect twice in one request so the first redirect would win.