• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

control after redirecting

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 541
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may consider using an Include, so that the second page code gets executed in the middle of the first page code.
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic