I have to perform two operations on button click.
- call a method in a bean which will return a url and it will be set in some variable. 
- after that I have to open that url in another tab. I am using the action attribute of CommandButton and it is setting the URL value correctly, but how do I open that url as pdf in a new tab. i.e "URL of pdf should open in a new tab" 
Code sample as follows:
<div class="form-options">
    <h:commandButton value="Download Report" styleClass="btn btn-primary btn-icon buttonCustom" actionListener="#{reportBean.GenerateReport}">
    </h:commandButton>
</div>  
 
     
     
     
    