java - After redirect code still executing from previos page -
how system.out.println("") executed after response has been redirected other resource.
in code:
res.sendredirect("/more_value_in_param/display.jsp"); system.out.println("to avoid penalty , disconnection"); why in console to avoid penalty , disconnection being displayed since response has been redirected display.jsp?
the sendredirect() method not halt execution of method.
should either branch code in such way call sendredirect() last statement in method or explicitly call return; after calling sendredirect().
Comments
Post a Comment