Does finally execute if there is a sendredirect and return.
try{ response.sendRedirect( session.getAttribute("site")+"/jsp/process/payment.jsp?oid="+session.getAttribute("OrderID")+"&term="+session.getAttribute("MerchantID")); return; }finally{ }
Does finally execute if there is a sendredirect and return.
try{ response.sendRedirect( session.getAttribute("site")+"/jsp/process/payment.jsp?oid="+session.getAttribute("OrderID")+"&term="+session.getAttribute("MerchantID")); return; }finally{ }
finally is not executed only in cases:
System.exit()
public static int getANumber(){ try{ return 7; } finally { return 43; } }
Calling the getANumber()
method returns 43.
the finally
block is executed before the try
return
of the try
block if there is a return
in the finally
block - the try
block’s return
is ignored
return
may have side effects ... - Qwertiy ♦response.sendRedirect
is first executed - NurlanSource: https://ru.stackoverflow.com/questions/416093/
All Articles