You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Pavel Arnošt <pa...@loutka.cz> on 2012/06/21 09:42:21 UTC

Re[4]: "No saved view state could be found" after redeploy

Thanks. It should be probably mentioned at "Configuring MyFaces" and 
"FAQ". Section with best practices and recommendations at "Secure Your 
Application" would also be great, it's not that obvious what algorithms 
and key sizes are best for production.

------ Původní zpráva ------
Od: "Leonardo Uribe" <lu...@gmail.com>
Komu: "MyFaces Discussion" <us...@myfaces.apache.org>;"Pavel Arnošt" 
<pa...@loutka.cz>
Odesláno: 21.6.2012 7:33:29
Předmět: Re: Re[2]: "No saved view state could be found" after redeploy
>Hi
>
>It is a known situation. You need to check the instructions here:
>
>http://wiki.apache.org/myfaces/Secure_Your_Application
>
>When you redeploy your app, a new encryption key is generated, so the
>old view state cannot be decoded and ViewExpiredException is thrown.
>Just set the right params and that's it.
>
>regards,
>
>Leonardo Uribe
>
>2012/6/21 Pavel Arnošt <pa...@loutka.cz>:
>
>>
>>Hi Ted,
>>
>>1) tomcat session persistence should be on by default and "<Manager
>>pathname="" />" is commented out, so I suppose that it's on
>>
>>2) state saving metod should be server, it's default and
>>javax.faces.STATE_SAVING_METHOD in web.xml is set to server
>>
>>With Tomcat 7.0.27+OWB 1.1.4+MyFaces 2.1.8+CODI 1.0.5 exception is thrown,
>>with  Tomcat 7.0.27+OWB 1.1.4+Mojarra 2.1.9+CODI 1.0.5 it is not.
>>
>>I have not found anything unsual in Tomcat's log.
>>I tried it once more now, with javax.faces.STATE_SAVING_METHOD set to client
>>in web.xml, and it also throws ViewExpiredException, strange.
>>
>>------ Původní zpráva ------
>>Od: "Ted" <r6...@gmail.com>
>>Komu: "MyFaces Discussion" <us...@myfaces.apache.org>;"Pavel Arnošt"
>><pa...@loutka.cz>
>>Odesláno: 20.6.2012 23:58:12
>>Předmět: Re: "No saved view state could be found" after redeploy
>>
>>>
>>>
>>>there's 2 things you might want to check
>>>
>>>1) tomcat's session persistance across tomcat restarts :
>>>http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html
>>>2) jsf state saving method, i.e. client or server
>>>
>>>
>>>On Thu, Jun 21, 2012 at 7:16 AM, Pavel Arnošt <pa...@loutka.cz>
>>>wrote:
>>>Hi,
>>>
>>>I have simple page with one form. When I:
>>>
>>>1) load page
>>>2) redeploy application
>>>3) submit form
>>>
>>>exception is thrown:
>>>
>>>/index.facesNo saved view state could be found for the view identifier:
>>>/index.faces
>>>
>>>Caused by:
>>>javax.faces.application.ViewExpiredException - /index.facesNo saved view
>>>state could be found for the view identifier: /index.faces
>>>at
>>>org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:132)
>>>
>>>
>>>Server is Tomcat 7.0.27 with OWB 1.1.4, MyFaces 2.1.8 and CODI 1.0.5. I
>>>have tried replacing MyFaces with Mojarra 2.1.9 and no exception is thrown
>>>with Mojarra in submit after redeploy. Why MyFaces throws exception and
>>>Mojarra don't?
>>>
>>>Thanks,
>>>Regards,
>>>Pavel
>>>
>>>
>>>
>>
>>
>>
>>
>>--
>>Ted.
>>
>>
>>
>