Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

tricky jsp redirect problem  RSS feed

 
Fieran Mason
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
platform details
win2k/apache2/tomcat5/mysql(not sure about version num)

goal
dynamically create a table of photo graphs which are queried from the database.
have those photographs redirect the user to a details.jsp page where information about the photo is displayed.

my approach
use a list of productbeans to store the info about the photos
use a htmlutil class to build the table of photos and make those photos into href's

why it doesn't work
I am at the same time maintaining session info. It would appear that using a hyperlink nullifies your session info.

solutions I have thought about

using formns
didn't work cuz the number of forms I need is dynamic and html is static

using redirect in the htmlutil
I can output text to the bowser, but in order to use redirect it would need to be part of a jsp which was then compiled...not a text that looks like jsp code.

passing the sessionid along in the href tag
I got the session Id to show up as a paramater on the next page, but I don't know how to turn the id string back into the session, in other words, I don't know how to fetch the session from my viewdetails class if I have the session id string

Disclaimer, I am a newb, this is my first real application and so I may be making assumptions or mistakes. I have however spent 5 hours reading forums and haven't found an awnser to this problem. Any suggested solutions, whether they resemble the original plan or not would be appreciated. Critical elements are that I have a dynamic number of product images and they need to link to a jsp page.

Regards,
Fieran Mason-Blakley
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65832
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would appear that using a hyperlink nullifies your session info.


This is an incorrect sipposition. What symptoms are you seeing that cause you to think this?

Attributes on the request will, of course, not survive a transition between pages. But session attributes will be around as long as the session is active. I am assuming that the pages in question are all part of the same web app.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!