Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
return after jsp:forward action
Joined: Nov 15, 2001
Oct 29, 2003 03:05:00
We must explicitly use return; after a call to jsp:forward. am I wrong?
pageContext.getOut().clearBuffer(); <jsp:forward ...> <jsp :-P aram name="n1" value="v1" /> </jsp:forward> I mean, we are still inside the [B]service()[/B] method of a jsp-servlet so we must [B]return() B]
Joined: Nov 27, 2001
Oct 29, 2003 03:59:00
You don't have to. as long as you don't write anything to the response, it's ok. But in many cases developers write return; after forwarding.
I'm not going to be a Rock Star. I'm going to be a LEGEND!
It is sorta covered in the
JavaRanch Style Guide
subject: return after jsp:forward action
Servlets - Request - Threads question?
RequestDispatcher forward doubt?
Unable to use forward option with parameters
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013