This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Related to bean access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Related to bean access" Watch "Related to bean access" New topic

Related to bean access

Chandran Madesh

Joined: Nov 30, 2007
Posts: 18
Dear All,

I have one bean class that consiist of setter and getter methods. Am setting the bean from one servlet class, and getting bean in another java class.
after set some value to bean component, that value is not available while i am calling coresponding getter method.

My doubt is after set the bean component is it necessary to pass that bean object through httpServletResponse to the class in which we are calling the bean getter method?

Kindly some body explain me...

<b>Chandran.M<br /> <br /> <br /> Do Your Best <br /></b>
Amit Prakash Singh
Ranch Hand

Joined: May 11, 2006
Posts: 38
Hi Chandran,


1. You created an object.
2. You updated that Object with some values.
3. Now you need to store reference to that object somewhere so that you can pass on that refernce to other part of the application. In your case, you can store the attribute in request or in session scope and use it in next jsp/servlet.

Amit Prakash Singh<br /> <br />SCJP 1.4 93% <br />SCWCD1.5 85%
I agree. Here's the link:
subject: Related to bean access
jQuery in Action, 3rd edition