zollen
asked on
spring framework ModelAndView question..
Hi,
In my controller object, it creates a ModelAndView object and invoke the following methods:
ModelAndView mv = new ModelAndView("hello");
mv.addObject(req);
mv.addObject(resp);
mv.addObject(ctx);
I would like to know how to access these objects (i.e. req, resp, ctx) in my JSP??
Thanks.
In my controller object, it creates a ModelAndView object and invoke the following methods:
ModelAndView mv = new ModelAndView("hello");
mv.addObject(req);
mv.addObject(resp);
mv.addObject(ctx);
I would like to know how to access these objects (i.e. req, resp, ctx) in my JSP??
Thanks.
ASKER
But how do I access req, resp and ctx objects in my JSP????
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
mv.addObject("req", req);
mv.addObject("resp", resp);
mv.addObject("ctx", ctx);
[1] http://www.springframework.org/docs/api/org/springframework/web/servlet/ModelAndView.html#addObject(java.lang.String,%20java.lang.Object)