i need default page when reload(refresh) the jsp page
posted 9 years ago
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.
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.