Package org.springframework.web.servlet
Class ModelAndViewDefiningException
java.lang.Object
java.lang.Throwable
java.lang.Exception
jakarta.servlet.ServletException
org.springframework.web.servlet.ModelAndViewDefiningException
- All Implemented Interfaces:
- Serializable
Exception to be thrown on error conditions that should forward
 to a specific view with a specific model.
 
Can be thrown at any time during handler processing. This includes any template methods of pre-built controllers. For example, a form controller might abort to a specific error page if certain parameters do not allow to proceed with the normal workflow.
- Since:
- 22.11.2003
- Author:
- Juergen Hoeller
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionModelAndViewDefiningException(ModelAndView modelAndView) Create new ModelAndViewDefiningException with the given ModelAndView, typically representing a specific error page.
- 
Method SummaryModifier and TypeMethodDescriptionReturn the ModelAndView that this exception contains for forwarding to.Methods inherited from class jakarta.servlet.ServletExceptiongetRootCauseMethods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Constructor Details- 
ModelAndViewDefiningExceptionCreate new ModelAndViewDefiningException with the given ModelAndView, typically representing a specific error page.- Parameters:
- modelAndView- the ModelAndView with view to forward to and model to expose
 
 
- 
- 
Method Details- 
getModelAndViewReturn the ModelAndView that this exception contains for forwarding to.
 
-