please enlighten as to how to use response.sendRedirect();
in a jsp page ,wherein u have to redirect the cursor to different pages depending on condition the end user selects.
eg>> during use of radio buttons
problem --does not execute in nested if statements
well you have to use like this
if you wanna to pass the param as a querystring in the URL
ok i hope this helps you
hey if you have any doubt you can write me to zeus2k at hotvoice dot com
i think for ur problem, check out RequestDispatcher object . it has two methods include() and forward(). forward() is the right way to do what u wanna do. it is faster than sendRirect().
forward is faster than response.sendRedirect(), because
it is on the server side. Also, the existing request
object remains and is accessible on the new JSP.
However, sendRedirect() is better when all of these
1) You want the user's browser location bar to reflect
the second page
2) You are finished with the first request object
3) You don't mind the time delay while the user's browser
makes that second request
I've found #1 is important to two groups of people:
1) QA engineers trying to figure out which page is having
2) Managers tracking web site usage statistics... the forwards tend to fool their tools as the "forwarded to"
page may not show up.