Is it possible to use a JSF (PrimeFaces) page in the following fashion ? :
Use <f:viewParam> to set GET parameters as bean properties and use <f:event> to execute a bean action and use NavigationHandler to perform navigation programmatically.
View:
<f:metadata>
<f:viewParam name="foo" value="#{bean.foo}" />
<f:viewParam name="bar" value="#{bean.bar}" />
<f:event type="preRenderView" listener="#{bean.action}" />
</f:metadata>
Bean:
public void action() {
// ...
FacesContext context = FacesContext.getCurrentInstance();
NavigationHandler navigationHandler = context.getApplication().getNavigationHandler();
navigationHandler.handleNavigation(context, null, "outcome");
}
Note that, depending on the concrete functional requirement, JSF might not necessarily be the right tool for the job. I'd investigate if you couldn't better use a servlet filter or even a plain servlet for the purpose.