I'm new to Spring MVC. I'm trying to write a controller that handles a particular route. This controller renders a View jsp and returns it.
I now want to add an error page in some particular cases (e.g., browser not supported)
How do I do that in spring?
I'm not sure if this is the right approach but here is what I've found so far: preHandle Interceptor
I can add some sort of interceptor before the controller and check if the error condition is met. Based on that I can show an error page or continue with regular flow.
Aucun commentaire:
Enregistrer un commentaire