Is it possible to pass a strongly typed model to the view / jsp page?

In spring mvc, I noticed that models are passed as a name / value pair in ModelAndView.

Is it possible to create a strongly typed model and pass it into the view?

thus, the caller in the view cannot access the index of the row that does not exist.

+3
source share
2 answers

JSTL is not type safe - it is a scripting language. Also, to validate jsp, you'll need a sophisticated validation tool.

So, I do not think you can do this.

+2
source

, Scalate Spring MVC. , . Scalate , .

. , . .

0

Source: https://habr.com/ru/post/1730102/


All Articles