hi
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
-
response.sendRedirect(); (3 messages)
- Posted by: keith mascarenhas
- Posted on: November 24 2000 13:59 EST
Threaded Messages (3)
- hi check this by ram kumar on November 25 2000 09:55 EST
- response.sendRedirect(); by Kapil Israni on November 30 2000 10:12 EST
- response.sendRedirect(); by Marc Missire on December 03 2000 23:11 EST
-
hi check this[ Go to top ]
- Posted by: ram kumar
- Posted on: November 25 2000 09:55 EST
- in response to keith mascarenhas
hi keith
well you have to use like this
response.sendRedirect("page.jsp");
say if your user click radiobutton1 then you should write javascript and keep track of the radiobuttonclicked and use
if you wanna to pass the param as a querystring in the URL
response.sendRedirect("click.jsp?buttonname=radiobutton1&value=1");
ok i hope this helps you
hey if you have any doubt you can write me to zeus2k at hotvoice dot com
bye
take care
zeus -
response.sendRedirect();[ Go to top ]
- Posted by: Kapil Israni
- Posted on: November 30 2000 10:12 EST
- in response to keith mascarenhas
hi keith,
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().
kapil
-
response.sendRedirect();[ Go to top ]
- Posted by: Marc Missire
- Posted on: December 03 2000 23:11 EST
- in response to Kapil Israni
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
are true:
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
a problem
2) Managers tracking web site usage statistics... the forwards tend to fool their tools as the "forwarded to"
page may not show up.