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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:15:25+00:00 2026-05-27T21:15:25+00:00

I am using Java 6, jsf 1.2, spring on tomcat and if I do

  • 0

I am using Java 6, jsf 1.2, spring on tomcat and if I do an operation after a timeout from a certain page, I get the exception below.

My question is why doesn’t the page get redirected to my error page /error/error.jsf?

This is the web.xml (I have no filters):

<error-page>
    <exception-type>javax.faces.application.ViewExpiredException</exception-type>
    <location>/error/error.jsf</location>
</error-page>
  <error-page>
    <exception-type>java.lang.IllegalStateException</exception-type>
    <location>/error/error.jsf</location>
</error-page>
 <error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/error/error.jsf</location>
</error-page>
<error-page>
    <exception-type>org.springframework.beans.factory.BeanCreationException</exception-type>
    <location>/error/error.jsf</location>
</error-page>

This is the error message on my page:


   An Error Occurred:
    Error creating bean with name 'melaketViewHandler' defined in 
ServletContext resource [/WEB-INF/JSFViewHandlersContext.xml]: Instantiation 
of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: 
Could not instantiate bean class [com.ewave.meuhedet.view.melaketViewHandlers.MelaketViewHandler]: Constructor threw 
exception; nested exception is java.lang.NullPointerException

        - Stack Trace

        org.springframework.beans.factory.BeanCreationException: Error creating bean
     with name 'melaketViewHandler' defined in ServletContext resource 
    [/WEB-INF/JSFViewHandlersContext.xml]: Instantiation of bean failed; nested 
    exception is org.springframework.beans.BeanInstantiationException: Could not
     instantiate bean class [com.ewave.meuhedet.view.melaketViewHandlers.MelaketViewHandler]:
     Constructor threw exception; nested exception is java.lang.NullPointerException

      at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254) 
...
  • 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-27T21:15:25+00:00Added an answer on May 27, 2026 at 9:15 pm

    We’re using a custom view handler that catches the exceptions and redirects to the error page:

    public class ExceptionHandlingFaceletViewHandler extends FaceletViewHandler { 
      ...
    
      protected void handleRenderException( FacesContext context, Exception exception ) throws IOException, ELException, FacesException {  
        try {
          if( context.getViewRoot().getViewId().matches( ".*/error.jsf" ) ) {
            /*
             * This is to protect from infinite redirects if the error page itself is updated in the
             * future and has an error
             */
            LOG.fatal("Redirected back to ourselves, there must be a problem with the error.xhtml page", exception );
            return;
          }
    
          String contextPath = FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath();
          getHttpResponseObject().sendRedirect( contextPath + "/error" );
        }
        catch( IOException ioe ) {
          LOG.fatal( "Could not process redirect to handle application error", ioe );
        }
      }
    
      private HttpServletResponse getHttpResponseObject() {
        return (HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse();
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using JSF 1.2 with Spring on Tomcat 6.0.18. I am able to successfully
Using java, minus the exception handling, it is as simple as FileOutputStream ostream =
I'm using Java 6, Tomcat 6, and Metro. I use WebService and WebMethod annotations
how to render a datatable based on the list size in jsf using java
I'm building a Java Web Application using Java EE 6 and JSF-2.0, using the
I am using jsf and spring together in web application. I have configured datasource
I want to forward request to a non-JSF page from JSF action method. I
on my company we are developing a ERP-like app using java and jsf, so
I'm developing a web application using Java EE6 and JSF 2.0. I have a
I have a Java application runnning on a Glassfish server using JSF 2.0.2. at

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.