JSF navigation - servlet parameters
I have an existing JSP based system which uses a 'controller' servlet to process my requests, e.g. 'controller?action=login' to display the login page and pad it out using request attributes.
When I make the login page into a jsf...
1. how do I make the jsf load via the servlet again when the login form fields fail validation after form is submitted. I.e. the login.jsp is called directly and not via 'controller?action=login' and so loses the attributes which it should have?
2. how do I make the jsf navigation 'to-view-id' include a parameter. For example; if login is successful I want to go to 'controller?action=myaccount'? I have the basic framework set up but this only navigates between the JSP pages and not from the 'via controller servlet' view.
In escence, I have;
<navigation-rule>
<from-view-id>/loginPage.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/myAccountPage.jsp</to-view-id>
<redirect/>
</navigation-case>
<navigation-case>
<from-outcome>failure</from-outcome>
<to-view-id>/loginPage.jsp</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
And I want something like;
<navigation-rule>
<from-view-id>/controller?action=login</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/controller/action=myaccount</to-view-id>
<redirect/>
</navigation-case>
<navigation-case>
<from-outcome>failure</from-outcome>
<to-view-id>/controller?action=login</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
Thanks for the help

