-
Mar 21st, 2011, 05:01 AM
#1
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?
-
Mar 21st, 2011, 06:39 AM
#2
-
Mar 21st, 2011, 08:38 AM
#3
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
-
Forum Rules