Results 1 to 3 of 3

Thread: Handling exceptions

  1. #1
    Join Date
    Oct 2010
    Posts
    19

    Default Handling exceptions

    Hello,

    I would like to handle constraint violations, when the user delete a registry that is referenced by a foreign key.

    What is the best way to do this. I would like to use something like "uncaughtException.jspx" but specific to this.

    I guess this is very simple, but if anyone can help?

  2. #2
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

  3. #3
    Join Date
    Oct 2010
    Posts
    19

    Default

    I am looking for something that does not include DAO, and that it's more Spring framework like.

    I am trying something like this on webmvc-config.xml:

    <bean class="org.springframework.web.servlet.handler.Sim pleMappingExceptionResolver" p:defaultErrorView="uncaughtException">
    <property name="exceptionMappings">
    <props>
    <prop key=".ConstraintViolationException">constraintViol ation</prop>
    <prop key=".DataAccessException">dataAccessFailure</prop>
    <prop key=".NoSuchRequestHandlingMethodException">resour ceNotFound</prop>
    <prop key=".TypeMismatchException">resourceNotFound</prop>
    <prop key=".MissingServletRequestParameterException">res ourceNotFound</prop>

    </props>
    </property>
    </bean>


    But the exception is not caught !!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •