| Author |
control after redirecting
|
mahadev ramalingam
Greenhorn
Joined: Jan 15, 2002
Posts: 12
|
|
Hi, I've a jsp page pageOne.jsp... from that, I'm redirecting to pageTwo.jsp... after that, I want the control back to pageOne.jsp!!! I know that its not possible...still tried for that... moreover, my pageTwo.jsp is redirecting to pageThree.jsp... I need the control back in pageOne.jsp...i.e...after redirecting to pageTwo, I've some more statements to be executed... Is there any other way to do this? using threads...or any other way...pls help... I tried forward and include instead of redirecting...but they're not working...
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12325
|
|
I think you need to redesign your application if the present structure is causing so much trouble. Back off a bit, forget your existing structure, and try to define what the application is supposed to look like to a user. Throwing away a great tangled mess of code and starting over happens all the time in any language. Bill
|
Java Resources at www.wbrogden.com
|
 |
Tim Baker
Ranch Hand
Joined: Oct 04, 2003
Posts: 541
|
|
|
You may consider using an Include, so that the second page code gets executed in the middle of the first page code.
|
Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
|
 |
Ken Robinson
Ranch Hand
Joined: Dec 23, 2003
Posts: 101
|
|
I suggest using only display logic in your JSP. Have a servlet do all of the work such as business calls, JDBC calls, EJB calls and such. Have the JSP only display the results. Using JSTL, you can import other page 'bits' to allow the logic to reside in one file and have that piece of a page displayed anywhere the <c:import> is used. Having display and logic in the same tier/file is not popular for many reasons with your problem being one of the main issues.
|
 |
mahadev ramalingam
Greenhorn
Joined: Jan 15, 2002
Posts: 12
|
|
Using include didn't work as it needs some credentials from my browser which, I could get only from sendRedirect. May be I need to rethink on my design.
|
 |
 |
|
|
subject: control after redirecting
|
|
|