I\'m trying to create a link to open a new page in a different window/tab and display some msg from backing bean but fail to do it, wonder know why?
here is my xhtml
And my javascript:
ServerSide action method:
public String onPageLoadForNewTab(){
HttpServletRequest req = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest(); String url = req.getRequestURL().toString();
url=(url.substring(0, url.length() - req.getRequestURI().length()) + req.getContextPath() + "/"); url=url+navigationpagename+".jsf"; RequestContext.getCurrentInstance().
execute("window.open('"+url+"','_blank')");**
return ""; }