Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Refreshing output from bean classes  RSS feed

 
sangita kandel
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
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
Thanks,
sangeetha
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!