• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

i need default page when reload(refresh) the jsp page

 
Edukondalu Avula
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
i am developing a jsp page with JSF, for this i have a managed bean, in my jsp page there are some output labels those are set from managed bean, my problem is when i reload or refresh the page those output labels are present, now i need a default page ( means labels must be empty or clear )how can i solve this problem.


Thanks & Regards
Edukondalu Avula
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Managed beans can be put into any scope. In which scope are you putting your bean into? I think it is session. In session the values will be preserved till the end of session. You can simply change the session scope to request scope and then on each request new instance of bean will be created. So all the other previous values will have no effect on your page.

Whenever you will refresh your page new bean instance will be binded.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic