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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "javabean question" Watch "javabean question" New topic

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.
I agree. Here's the link: http://aspose.com/file-tools
subject: javabean question
Similar Threads
Using Session Bean Info in a server
How to display questions in several pages?
forward problem in JSP
Have I implemented BusinessDelegate?
forwarding from a servlet to jsp