caching - How to force browser to load a page.xhtml from servers always, in JSF -


i have page called newtest.xhtml, backed cdi bean called newtest, when user clicks button should work in backinhg bean , return same page newtest.xhtml. problem when click button browser not refresh page. when click refresh manually browser refresh page. question : in jsf how can tell browser load page server not cache

public string dowork() {         //do work          return "/newtest.xhtml?faces-redirect=true";     } 

fixed have fixed problem using ajax's render="@all"

<h:commandbutton  >     <f:ajax execute="@all" render="@all"/> </h:commandbutton> 

you can make redirection request page

externalcontext externalcontext = facescontext.getcurrentinstance().getexternalcontext(); externalcontext.redirect(((httpservletrequest) externalcontext.getrequest()).getrequesturi()); 

Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -