Java / Spring / JSP - how to output value added using ModelAndView.addObject

Posted by Jon morgan on Stack Overflow See other posts from Stack Overflow or by Jon morgan
Published on 2010-04-16T09:45:52Z Indexed on 2010/04/16 9:53 UTC
Read the original article Hit count: 416

Filed under:
|
|

Hi,

I have the following code in my controller

final ModelAndView m = new ModelAndView();
m.addObject("date", "15" );

In my view I have been able to output this by doing

${date}

However how can I print it out using out.print or assign it to a new variable e.g.

<% out.print( ${date} ) %>

Thanks

© Stack Overflow or respective owner

Related posts about java

Related posts about spring