Home > Back-end >  For SpringMVC response ModelAndView setting data after failed to get data front-end JSP
For SpringMVC response ModelAndView setting data after failed to get data front-end JSP

Time:09-17


The controller code:

ModelAndView ModelAndView=new ModelAndView ();
ModelAndView. AddObject (" username ", "zhangsan");

The JSP:


Results:
Page displayed ${username}

CodePudding user response:

Using springboot, thymeleaf is very convenient

CodePudding user response:

<% % @ page isELIgnored="false" & gt; Add this property page try, don't know if the servlet version is too low, not support el expression

CodePudding user response:

Can controller code stick full? ModelAndView request own parameters, isn't it? Need a new one?

CodePudding user response:

You use for springmvc in the JSP page with this & lt; % % @ page isELIgnored="false" & gt; Yesterday, I also met

CodePudding user response:

Page open EL

  • Related