Todd Patrick wrote:
> JSF 1.2_07
> Java EE 5
>
> I've been suffering through the following error by using JAAS with JSF
> 1.2_07:
>
> javax.faces.application.ViewExpiredException:
> viewId:/customer/customer.jsf - View /customer/customer.jsf could not be
> restored.
> at
> com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:1
> 86)
>
>
> I googled information on JSF 1.1 compatibility mode by setting the
> following in my web.xml:
>
> <context-param>
>
> <param-name>com.sun.faces.enableRestoreView11Compatibility</param-name>
> <param-value>true</param-value>
> </context-param>
>
>
> Now, everything is working without error - I can get JAAS and JSF to
> work properly?!?!
>
> Where is the documentation on what the JSF 1.1 compatibility mode
> actually does?
>
>
It's not documented, because ideally it's not needed.
Some background:
JSF 1.1, if using server-side state saving and the session expired, the view
would just be created from scratch and rendered.
In JSF 1.2, it was decided that if the session expires that a
ViewExpiredException
would be thrown to allow developers more control of what happens when a
session
expires (e.g. have a custom mechanism that catches this exception and
redirects the
user to a login page).
When you enable that parameter, you get the behavior that was specified
for 1.1.
I'd recommend not relying on this parameter. Have you looked at this
blog [1] on
JAAS and JSF (it uses JSF 1.2)?
[1]
http://weblogs.java.net/blog/edburns/archive/2006/03/repost_using_ja.html
> Thanks,
>
> --Todd
>
> -----------------------------------------
> NOTICE: This email message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged
> information. Any unauthorized use, disclosure or distribution is
> prohibited. If you are not the intended recipient, please contact
> the sender by reply email and destroy all copies of the original
> message.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: users-help_at_javaserverfaces.dev.java.net
>
>