I am trying to pass data from the Controller to view (
jsp page) using ModelAndView object. Please consider the following code,
home.jsp
--------
<html>
.
.
<p>${message}</p>
.
</html>
Controller Class
----------------
public class UAMInternalController implements Controller {
protected final Log logger = LogFactory.getLog(getClass());
private
String greeting = "Namaste!";
.
.
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
.
.
return new ModelAndView("home","message", greeting);
}
}
The view is printing the variable as is, that is, ${message} instead of the contents of the variable "greeting". Please suggest a solution for this problem.
Thanks,
Swamy
SCJP 1.2, SCWCD, SCBCD