• 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

tricky jsp redirect problem

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic