public class

ModelAndViewDefiningException

extends ServletException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ javax.servlet.ServletException
         ↳ org.springframework.web.servlet.ModelAndViewDefiningException

Class Overview

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.

Summary

Public Constructors
ModelAndViewDefiningException(ModelAndView modelAndView)
Create new ModelAndViewDefiningException with the given ModelAndView, typically representing a specific error page.
Public Methods
ModelAndView getModelAndView()
Return the ModelAndView that this exception contains for forwarding to.
[Expand]
Inherited Methods
From class javax.servlet.ServletException
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public ModelAndViewDefiningException (ModelAndView modelAndView)

Create new ModelAndViewDefiningException with the given ModelAndView, typically representing a specific error page.

Parameters
modelAndView ModelAndView with view to forward to and model to expose

Public Methods

public ModelAndView getModelAndView ()

Return the ModelAndView that this exception contains for forwarding to.