Struts: Using <bean:message> in a page inserted by tiles


Web tier: servlets, JSP, Web frameworks: Struts: Using <bean:message> in a page inserted by tiles

  1. I want to use tiles in combination with the <bean:message /> tag.

    This works fine if I use <bean:message /> inside the layout.jsp. When using <bean:message /> inside the customer_find.jsp, a page inserted by a <tiles:insert> tag, the tag is not interpreted.

    I cannot understand why there is a different bahavior?
    How can I manage that the <bean:message key="" /> will work inside the pages inserted by <tiles:insert attribute="content"/>.

        <definition name="layout" path="/layout.jsp">
            <put name="navigation" value="/navigation.jsp" />
            <put name="content" value="/customer_find.jsp" />

    File layout.jsp:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

      <tiles:insert attribute="navigation" />
      <tiles:insert attribute="content"/>
  2. just a guess have u tried the <tiles:importAttributes/> in the page ?
  3. Can you show me your customer find .jsp page?