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 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 am getting this exception when trying to save a file: System.Web.HttpException: The SaveAs
first of all some details: I configured security as below in web.xml view plaincopy
I have configured the loading of the properties file as shown below (Spring 3.1)
The VFS method cannot process this URI ${jboss.server.temp.dir}/local/outgoing configured in jboss-beans.xml which is resolved
I have configured my pom file to use maven-embedded-glassfish-plugin. In fact this is the
given below is the url configured as an autosys job .This calls the servlet
I have xdebug configured as shown below but the error-output is totally unreadable. Do
does a service, which is configured like in the box below, throwing a 404
I configured a jail with Chroot in SSH following this tutorial . I found
Below example of one-to-one relationship throws an exception public class User { public int

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.