I'd like to allow user to enter some text for the pdf file and when the user clicks on a link / button, the pdf file will be open in a new window. So I cannot use <s:link> because it doesn't submit the form. But a <h:commandLink target=
_blank> and <a4j:commandLink target=
_blank> don't open the pdf in a new window.
PDF isn't a factor here. It's standard JSF. Set the target attribute on the h:form.