-
1. Re: How to resolved ViewExpiredException in JSF
kapil29 Nov 27, 2011 5:23 AM (in response to kapil29)could someone please help me to sort out this issue?
Thanks
-
2. Re: How to resolved ViewExpiredException in JSF
healeyb Nov 28, 2011 5:29 AM (in response to kapil29)I'm afraid that I've only had to deal with this on JSF 2, I suspect this solution is applicable only
to JSF 2:
http://weblogs.java.net/blog/edburns/archive/2009/09/03/dealing-gracefully-viewexpiredexception-jsf2
-
3. Re: How to resolved ViewExpiredException in JSF
kapil29 Nov 29, 2011 11:11 AM (in response to healeyb)Thanks Brendan for the reply.
But my application is already defined the below code in web.xml
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/viewExpired.xhtml</location>
</error-page>
But when the view expired, the "viewExpired.xhtml" page doesn't load at all. Instead its redirected to login page bydefault when view expired.
Please find the below code for viewExpired.xhtml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>
View Expired  
</title>
</h:head>
<h:body>
<h:form>
A ViewExpiredException was detected.
<h:outputLink value="/login.jsf">Click here to return to the start page.</h:outputLink>
</h:form>
</h:body>
</html>
Can you please let me know how could this solves the issue? i am facing this since long time and doesn't find any exact solution. I did a lot of goggling and R & D on this.
-
4. Re: How to resolved ViewExpiredException in JSF
healeyb Nov 29, 2011 11:57 AM (in response to kapil29)The problem is that I only ever had limited experience with JSF 1 and I've forgotten most of it! It is well
understood that with JSF 2 the approach you describe in your post will not work for ViewExpiredException,
and it is necessary to implement a custom exception handler (as per Ed Burn's blog post).
I strongly suspect that the APIs described in this solution don't exist in JSF 1, and I've no idea what you
need to do I'm afraid. I would ask the question on stackoverflow if I was you, I couldn't find anything on
google when I looked.
Good luck finding a solution,
Brendan.
-
5. Re: How to resolved ViewExpiredException in JSF
kapil29 Nov 29, 2011 12:35 PM (in response to healeyb)Thanks Brendan,
I will definitly ask this in stackoverflow forum. thanks once again for your kind support
-
6. Re: How to resolved ViewExpiredException in JSF
pzelenka00 Nov 30, 2011 3:44 AM (in response to kapil29)Hi Kapil,
I'm facing the same problem and use almost the same approach. When ViewExpiredException occurs I automatically redirect the user to the main page via <c:redirect url="/"/>
Pavel