除非首先将Spring bean添加到模型中,否则它们在视图中(在您的情况下为JSP)是不可见的。
您必须将sessionBean添加到控制器中的模型中,以使其可用于视图。
model.addAttribute("sessionBean", sessionBean);
除非首先将Spring bean添加到模型中,否则它们在视图中(在您的情况下为JSP)是不可见的。
您必须将sessionBean添加到控制器中的模型中,以使其可用于视图。
model.addAttribute("sessionBean", sessionBean);上一篇 Spring Portlet Jquery Ajax发布到Controller
下一篇 在Java Web应用程序中,如何使用Spring 3.0批注从WEB-INB / conf位置读取log4j.xml