Dec 20th, 2005, 06:49 PM
I just want my view to come from a POJO
This may win the award for the dumbest question yet. But I've just started moving all my view rendering from JSP's to POJO's. I just don't want to bother with JSP anymore. So since I'm gutting everything, I thought this would be a good time to make the leap from Struts to Spring MVC as well. Anyway, I'm just getting started. I went through the doc and a tutorial. So I see how to forward to a JSP by doing something like, "return new ModelAndView("test.jps")" in the controller.... but I'm not using JSP. I'm thinking my answer might be the "Integrating view technologies" section of doc. But I'm just not getting it.
Any hints on how to do something simple like..
Dec 20th, 2005, 09:28 PM
Never mind. The reference guide wasn't really clear to me. However, the API documenation for ModelAndView cleared it all up.
All I needed to do was create a class implementing View, then write directly to the HttpServletResponse, create an instance of it and pass it back as part of the ModelAndView wrapper. Pretty simple.
Dec 21st, 2005, 05:20 AM
Sorry, I believe I've already won that for this year.
Originally Posted by jones
Dec 21st, 2005, 11:57 AM
Ha ha.. well you've got some serious competition now