Mar 11th, 2010, 03:25 PM
Exceptions and Error codes to go to the same page--but not going through controller
I am trying to put together a class that combines a form and an exception handler. (Basically, the form allows the user to send a message to the sys admin with a click--it's a wacky thing with the architecture designed by someone else.)
My class extends SimpleFormController and implements HandlerExceptionResolver.
In my web.xml, I had the error pages defined and were mapped to /Error.jsp. In my spring bean, it's set up like this:
<bean name="/Error.jsp" class="com.company.requirements.controller.Excepti onController">
<property name="formView" value="Error" />
<property name="bfconfig" ref="bizflow" />
Basically, I am trying to consolidate it into one stream to do both status codes and exceptions.
Anyway, the Error.jsp comes up fine in both a 404 and an Exception, but the 404 never seems to be going through the referenceData or any of the views, hence none of the background code or business logic is run.
Anyone else doing this? Am I totally barking up the wrong tree?
Thanks in advance for helping a newbie,
Tags for this Thread