tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken McWilliams <ken.mcwilli...@gmail.com>
Subject tiles decoration
Date Fri, 09 Nov 2012 20:47:33 GMT
I would like to render a tiles definition and put this into the body
attribute and then render an other definition now using that body attribute.

I'm using tiles 3 initialized with the

It probably does not matter but I am using struts2 to render a tiles
definition. To render the definition tiles require a "result type":

To get tiles working with struts2 I do the following:

    public void doExecute(String location, ActionInvocation invocation)
throws Exception {
        //location = "test.definition"; //for test
        ServletContext context = ServletActionContext.getServletContext();
        ApplicationContext applicationContext =
        TilesContainer container =
        HttpServletRequest request = ServletActionContext.getRequest();
        HttpServletResponse response = ServletActionContext.getResponse();
        ServletRequest servletRequest = new
ServletRequest(applicationContext, request, response);
        container.render(location, servletRequest);

The above works....

I'm using JSPs but I could use freemarker for the views, it it matters.

So how do I render a definition into an attribute and then use that value
in the rendering of another definition?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message