Handling business logic exceptions with Spring MVC
posted 9 years ago
I have a registerService which throws a RegistrationException if a username or email is already taken. On my registration page, I would like the user to see the message contained within the exception, instead of forwarding them to an error page ( I have seen examples of this ). I am using Spring MVC with a SimpleFormController. [ November 11, 2006: Message edited by: joe black ]
That would take the user to a different page. I would like a post back to the same form the user came from, with the error message at the top of the page - basically the same behavior as the Validator.