my dog learned polymorphism*
The moose likes JSF and the fly likes i need default page when reload(refresh) the jsp page  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "i need default page when reload(refresh) the jsp page  " Watch "i need default page when reload(refresh) the jsp page  " New topic
Author

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

Edukondalu Avula
Greenhorn

Joined: Oct 03, 2008
Posts: 5
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

Joined: Aug 18, 2008
Posts: 598

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.


My Blog SCJP 5 SCWCD 5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: i need default page when reload(refresh) the jsp page
 
Similar Threads
JSF Browser Refresh
Problem with initializing managed-property parameter
Can anyone help me with my JSP/servlet problem?
How to adjust the inner table width with the frame width
AJAX requests on page reload