• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javabean question

 
Yongping Wang
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, All:
I have a question about javabean use. Here is the situation:
I initialize a javabean in a jsp page like <jsp useBean id="book" class=BookInfo" scope="session">
What will happen if I put an object (named book) of BookInfo into a session using session.setAttribute("book", book) in a servlet then the servlet forwards to the above jsp page?
1. two different objects of book coexist
2. the object of book initialized in the jsp page replace the object of book stored in session created in a servlet
3. the object of book initialized in the jsp page is the same as stored in session created in servlet. so the former has all infomation associated with the latter
Please clarify it for me. Thanks a lot.
Yongping
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic