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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:01:42+00:00 2026-05-17T16:01:42+00:00

I configured below exception resolver in my web configuration file but I am not

  • 0

I configured below exception resolver in my web configuration file but I am not sure why it cannot handle
errors such as this ‘No Matching error found for servlet request: path ‘/etc’

<bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
    <property name="exceptionMappings">
        <props>
            <prop key="java.lang.Exception">
                exception
            </prop>
        </props>
    </property>
</bean>

My app relies on Ajax and there are cases that I change the target url based on some user interactions.

My question is, is it possible for me to catch the error in my Spring MVC and forward it to my exception.jsp so that my user wont get
a nasty 404.

  • 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-17T16:01:42+00:00Added an answer on May 17, 2026 at 4:01 pm

    SimpleMappingExceptionResolver (and the HandlerExceptionResolver framework in general) will only be invoked to handle exceptions generated by the request handler (i.e. your controllers). If no handler is configured to handle the request, then it won’t get that far, and your resolver won’t be invoked.

    The simplest thing for you to do is to configure a 404-handling page in your web.xml, e.g.

    <error-page>
        <error-code>404</error-code>
        <location>/error.html</location>
    </error-page>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I often plug pre-configured lambdas into enumerable methods like 'map', 'select' etc. but the
I have IIS6 configured such that browsing to http://localhost:8082/Reports gets me the reporting services
I've got it configured, but I want more from it...maybe Cygwin isn't the right
and can it be configured not to happen? I'm usually finding myself saving a
I have a spring bean that I have configured in applicationContext like below: <bean
I am trying to run a springexample. I have configured my .xml file as
I'm getting exception while creating connection with SQL Server. ISession factory is shown below
When my application crashed, Windows XP did not generate the window given below I
I have a known working web service which is configured as a SOAP and
I have a NAT configured to run when loading up my favorite Linux distribution

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.