how to add dynamic value in apache tiles from controller in spring mvc

552 views Asked by At

tiles

   <definition name="home" extends="container">
            <put-attribute name="title" expression="${modal.title}" />
            <put-attribute name="body" value="/WEB-INF/jsp/masters/home.jsp" />
            <put-attribute name="view" value="home" />
        </definition>

this is my method in controller

@RequestMapping("/home/{linkAddress}")
    public String homeDt(
            @PathVariable(value="linkAddress") String linkAddress,Model model){
        HomeMt homeMt = homeMtService.findByLink(linkAddress);
        model.addAttribute("contentOne", homeMt.getContentOne());
        model.addAttribute("title", "ronaldo");
        model.addAttribute("homeMt", homeMt);
        return "home";
    }

enter image description here

my problem is that the title value is not coming in the jsp page, some say that enable the el support but it didn't worked for me. any help will be appreciated

0

There are 0 answers