spring mvc - Data transfer from controller to view page -


when set "message" attribute in modelmap, not displayed in jsp. instead of value of "message", string literal ${message} getting displayed in browser

userhandler.java

userhandler.java

hello.jsp hello.jsp

spring-bean-config.xml spring-bean-config.xml

web.xml web.xml

result page: here expect see welcome instead of ${message} result page

your problem not in controller, in view hello.jsp. happening view interpret ${message} literal text, not value of attribute.

i've never work jsp, following might trick you. in hello.jsp change line: ${message} : <c:out value="${message}" />


Comments