Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6859757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:19:23+00:00 2026-05-27T02:19:23+00:00

So I have a ViewExpiredException Handler and works fine. Now, when I launch the

  • 0

So I have a ViewExpiredException Handler and works fine.
Now, when I launch the web-app my URL looks like www.myApp.com/TestFaces/ and this presents the first page which is the login page.
If for any reason I leave the page at login, and the View expires the app catches the ViewExpiredException and sends me to a page “ViewExpired” BUT the URL keeps the same www.myApp.com/TestFaces/. On that “ViewExpired” page I have a commandLink to return to the login page which in the value attrib I put “index.xhtml” BUT it does not send me to login page because on there’s no page on www.myApp.com/TestFaces/index.xhtml but in www.myApp.com/TestFaces/faces/index.xhtml

So the questions are:

  1. Why if I’m at login page am I getting the ViewExpiredException? is it because of ajax?
  2. How or Where can I make the commandLink really sends me to index.xhtml?

This is only happening when the View expires in login page, in other pages from my app it works really great.

Thanks in advance !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:19:24+00:00Added an answer on May 27, 2026 at 2:19 am

    Why if I’m at login page am I getting the ViewExpiredException? is it because of ajax?

    You will get this exception when you invoke a POST request on a view which does not exist in session anymore. This can for example happen when you keep the page open for too long that the session has expired in the server side, or when you’re getting the login page from the browser cache instead of straight from the server. For more detail, see also our ViewExpiredException tag info page. All JSF ajax requests also accounts in this as they also use POST.


    How or Where can I make the commandLink really sends me to index.xhtml?

    Make use of implicit navigation. This way JSF will append the proper FacesServlet mapping.

    public String goToIndexPage() {
        return "index";
    }
    

    or

    <h:commandLink value="Go to index page" action="index" />
    

    or, better, when you don’t need to invoke any business logic at all:

    <h:link value="Go to index page" outcome="index" />
    

    See also:

    • Check if session exists JSF
    • When should I use h:outputLink instead of h:commandLink?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a look at this url: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:jquery_ui_methods#column_chooser I have got the Column Chooser dialog
have been trying couple of hours now to make my iphone app universal. The
Have a fun issue with sharepoint calendar view filtering. That code works fine: SPSecurity.RunWithElevatedPrivileges(delegate()
I have an error page error.jsf mentioned in the web.xml : <error-page> <exception-type>javax.faces.application.ViewExpiredException</exception-type> <location>/viewExpired.jsp</location>
Have a n-tire web application and search often times out after 30 secs. How
**Have it working now. I forgot to populate the Array List. How embarrassing. I'm
Have a look at one of my websites: moskah.com The problem is that it
I have a JSF 2.1 (MyFaces) app running using several Session Beans (All the
Have advancements in CPU design like dynamic instruction scheduling narrowed the performance gap between
Have an app that can use tts to read text messages. It can also

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.