Question

i have configured Spring MVC 3 with Tiles 3. All looks ok. But I can't get value from modelAttributes in jsp file.

<%@ page language="java" contentType="text/html; charset=UTF-8 pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="sf"%>
<%@ taglib tagdir="/WEB-INF/tags" prefix="vk" %>
CC${msg}DD

But after rendefing the page contains CCDD. The controller look like

@RequestMapping(value = "/credit.html")
public ModelAndView view(Locale locale) {
    ModelAndView ret = new ModelAndView("credit");

    ret.addObject("msg", "asdfasdfasdfa");
    return ret;
}

EL is working as the expression ${request == null} displays true on the page.

No correct solution

OTHER TIPS

The problem is the returned ModelAndView. I have import wrong class (from portlet package).

When I corrent the package all is working...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top