• 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

passing information to next page

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have a page, say default.jsp which uses a bean. The bean has a property (a object array -- conferences). The page will display the content of each of the objects (conferences). It is desired that the each object's name be a anchor to a form -- registration.jsp. When user follows the link, and fill up the form, how do I know which conference to save the data?

I've made the bean a scope of "session". (or "application" in this case?)

Thanks in advance for any help.

your very new jsp explorer

Ben
 
Ben Weng
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, playing around, I found this works but not sure if this is the way it should.

I burried the link like this "<a href=\"registration.jsp?conferenceID=" + myBean.getId() + "\">

And I got the form. And guess later I could get the id back from the url in my servlet.

Any comments and more ideas?

Thanks.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure if I understand you correctly, but can't you just use:



in the servlet to get the id of the selected conference?



...and then get the data for data conference in the form using a method of the bean:

 
Ben Weng
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Chris. That's exactly, well almost, what I did to get the problem solved.

bw
 
They gave me pumpkin ice cream. It was not pumpkin pie ice cream. Wiping my tongue on this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic