I'm attempting to migrate an existing JSF application from JSF 1.2 to JSF 2.0. I was using MyFaces 1.2.8 and want to use MyFaces 2.0.5.
What I'm experiencing with MyFaces 2.0.5 is that the initially requested page will render properly, but any attempt to navigate to another page will result in a ViewExpiredException
. The message is:
No saved view state could be found for the view identifier: /SomePageName.jsf (where "SomePageName" is the name of the page that I am navigating away from)
If I manually type the Faces-friendly URL of the page I wanted to navigate to, such as http://localhost:8080/MYAPP/SomeOtherPage.jsf , then the other page will be properly rendered. The application also recognizes that I already have a session and does not try to create a new one.
My application consists exclusively of JSP files, as you would expect from a JSF 1.2 app. My intention is to first get the app working in JSF 2.0 and then rewrite each page as a Facelet one at a time.
Some of my navigation rules look like this:
<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 look like this:
<navigation-rule>
<navigation-case>
<from-outcome>MANAGE_PORT_LIST</from-outcome>
<to-view-id>/ManagePorts.jsp</to-view-id>
</navigation-case>
</navigation-rule>
(I realize that the REFRESH outcome is not the best way to do things, but that was already in the old 1.2 application and I'm not planning to remove it until I start the migration effort)
Can anyone tell me what I might be doing wrong that would cause the navigation to blow up like this?