This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes javabean question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "javabean question" Watch "javabean question" New topic
Author

javabean question

Yongping Wang
Ranch Hand

Joined: May 15, 2001
Posts: 40
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: javabean question
 
Similar Threads
forward problem in JSP
Have I implemented BusinessDelegate?
forwarding from a servlet to jsp
Using Session Bean Info in a server
How to display questions in several pages?