Here is my controller:
@RequestMapping("/com/index.do")
public String index(ModelMap model) throws Exception {
MyClass obj=new MyClass();
model.addAttribute("obj",obj);
return "/com/index";
}
Here is my view:
<%@page contentType="text/html; charset=UTF-8" pageEncoding="ISO-8859-1"%>
<%@page import="org.springframework.ui.ModelMap" %>
<%
ModelMap model=new ModelMap();
Object obj=model.get("obj");
%>
In here obj is null. In this case, how to retrieve that obj in view?
Note: I need to use in jsp tag (<% %>), not like this:
${obj}
Thanks!