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

  • Home
  • SEARCH
  • 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 7928343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:42:19+00:00 2026-06-03T19:42:19+00:00

in my JSF application whenever an exception occurs, it should display a JSF page,

  • 0

in my JSF application whenever an exception occurs, it should display a JSF page, which I designed to show the user that an error occurred, but no such thing happens, that’s the big problem.

Part of my web.xml

    <error-page>
        <exception-type>java.lang.Exception</exception-type>
        <location>/faces/error.jsf</location>
    </error-page>
    <error-page>
        <error-code>500</error-code>
        <location>/faces/error.jsf</location>
   </error-page>
  • 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-06-03T19:42:20+00:00Added an answer on June 3, 2026 at 7:42 pm

    That can happen when the exception occurs during an ajax request, or when the exception occurs when the response has already been committed.

    Exceptions on ajax requests needs to be handled by a custom ExceptionHandler. OmniFaces has such one, the FullAjaxExceptionHandler which utilizes standard Servlet API error page mechanism.

    Exceptions while the response is committed cannot be handled because a part of the response has already been sent to the client which is a point of no return. It can only be avoided by increasing the response buffer size by the following context parameter in web.xml:

    <context-param>
        <param-name>javax.faces.FACELETS_BUFFER_SIZE</param-name>
        <param-value>65535</param-value>    
    </context-param>
    

    The above example sets it to 64KB, it should be about the size of your largest page. This way the response won’t be committed until the size reaches 64KB or when it’s finished. This way the container will be able to change the response to the error page when an exception occurs.


    Unrelated to the concrete problem, you’ve by the way an overlap in the error page configuration there. Exceptions are implicitly always status 500 and you’re pointing to the same error page. So the error page one with java.lang.Exception is superflous.

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

Sidebar

Related Questions

Basically i have a enterprise jsf application which shows some services to the user.
when I try to render the view, browser show this error 01:46:11,371 GRAVE [javax.enterprise.resource.webcontainer.jsf.application]
I have a JSF 1.2 application that has a session going on and whenever
In my web jsf application, I display different messages to the user using this
In a certain page of our JSF application, the user sees a table listing
I have a JSP page in a JSF application which uses A4J. I want
I am developing a JSF application which has a servlet to display binary images.
I am developing a functionality in my jsf application, which should retrieve the lat
I have a JSF application that uses mostly Richfaces. I would like to introduce
I was trying out a simple JSF application, in which I need to check

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.