This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes Refreshing output from bean classes 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 » JSP
Bookmark "Refreshing output from bean classes" Watch "Refreshing output from bean classes" New topic

Refreshing output from bean classes

sangita kandel

Joined: Jul 09, 2002
Posts: 12
I am using a jsp:use bean tag to difne a bean that represents an instance of a class as below:
<jsp:useBean id="pageViews" scope="page" class="login.PageViewCountData"/>
the first time i call this page, it shows the correct data , but when i try to refresh it , it still shows the old data. I have system.out statements in the class that shows me the new values , but the jsp page doesnt seem to pick it.Please help me its urgent
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
The JSP takes the bean instance from the session - if you need to reflect state changes to the output, you'll need to put the bean object into the session with the new values.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
I agree. Here's the link:
subject: Refreshing output from bean classes
Similar Threads
what is the best Practice ?
displaying tag in jsp
[#text: String] being displayed in output
Discrepency in the order of creating a Stateful Session Bean
Help with displaying XML string