Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

passing information to next page  RSS feed

 
Ben Weng
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Kristian Breifossmo
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks, Chris. That's exactly, well almost, what I did to get the problem solved.

bw
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!