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 6784985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:04:06+00:00 2026-05-26T17:04:06+00:00

The ViewExpiredException is being handled by a redirect to the login screen. The problem

  • 0

The ViewExpiredException is being handled by a redirect to the login screen. The problem is that the exception is still logged, and the customer would strongly like to have the server.log exception-free.

While it may be a questionable requirement in this case, I still have to make it happen. We use Mojarra and deploy on JBoss EAP 5.1

The MyFaces approach does not help as I obviously cannot wrap the MyFacesServlet using Mojarra

I could not apply the advice given in the JBoss JSF guide to wrap the Faces servlet as I cannot find the jsf-integration-deployer-jboss-beans.xml anywhere.

I cannot get the approach proposed by Ed Burns to work either. I guess the reason is that it is targeted at JSF2 for I cannot find the javax.faces.context.ExceptionHandlerFactory in my jars.

Making the matter worse, I am quite new to JSF, so I have to rely on detailed guidance, in search of which I have found the above approaches but failed to apply them.

Thank you

  • 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-26T17:04:07+00:00Added an answer on May 26, 2026 at 5:04 pm

    That article is indeed targeted on JSF 2.x. JSF 1.x does not have any exception handling facility.

    Just catch and redirect yourself instead of letting the container do. A filter is a sensible place for this:

    try {
        chain.doFilter(request, response);
    } catch (ServletException e) {
        if (e.getRootCause() instanceof ViewExpiredException) {
            HttpServletRequest req = (HttpServletRequest) request;
            HttpServletResponse res = (HttpServletResponse) response;
            res.sendRedirect(req.getContextPath() + "/errors/session-expired.jsf");
        } else {
            throw e;
        }
    }
    

    Map this in web.xml on the servlet name of the FacesServlet to get it to run.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to set a particular page (one that does not require a
I'm trying to handle a ViewExpiredException exception on an ajax call using primefaces 2.2.1
I set up my web app as follows: <error-page> <exception-type>javax.faces.application.ViewExpiredException</exception-type> <location>/WEB-INF/include/viewExpired.html</location> </error-page> so that
To handle viewExpiredException in JSF, I coded <error-page> <exception-type>javax.faces.application.ViewExpiredException</exception-type> <location>/error.html</location> </error-page> <session-config> <session-timeout>1</session-timeout> </session-config>
I'm getting a ViewExpiredException when I'm at my login page, it is not supposed
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>
So I have a ViewExpiredException Handler and works fine. Now, when I launch the
I've tried to follow different posts on how to handle the ViewExpiredException in Mojarra
I have written simple application with container-managed security. The problem is when I log
I'm having an issue with a form that I have. The form allows users

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.