I am trying to migrate an existing JSF application from JSF 1.2 to JSF 2.0. I used MyFaces 1.2.8 and want to use MyFaces 2.0.5.
What I'm testing with MyFaces 2.0.5 is that the initially requested page will display correctly, but any attempt to go to another page will result in a ViewExpiredException . Message:
There is no saved view state for the view identifier: /SomePageName.jsf (where "SomePageName" is the name of the page I'm navigating from)
If I manually type in the Faces URL for the page I wanted to go to, for example http: // localhost: 8080 / MYAPP / SomeOtherPage.jsf , then the other page will display correctly. The application also acknowledges that I already have a session and is not trying to create a new one.
My application consists solely of JSP files, as you would expect from a JSF 1.2 application. My intention is to first get the application running in JSF 2.0 and then rewrite each page as one Facelet at a time.
Some of my navigation rules are as follows:
<navigation-rule> <display-name>ManagePorts</displayName> <from-view-id>/ManagePorts.jsp</from-view-id> <navigation-case> <from-outcome>REFRESH</from-outcome> <to-view-id>/ManagePorts.jsp</to-view-id> </navigation-case> </navigation-rule>
and some are as follows:
<navigation-rule> <navigation-case> <from-outcome>MANAGE_PORT_LIST</from-outcome> <to-view-id>/ManagePorts.jsp</to-view-id> </navigation-case> </navigation-rule>
(I understand that the result of REFRESH is not the best way to do something, but it was already in the old application 1.2, and I do not plan to delete it until I start the migration)
Can someone tell me what I can do wrong, which will cause the navigation to explode like this?
source share