1

I am using Tiles 2 and I want to have an attribute that sets the root path for resources. I have this is my XML:

<definition name="titledWrapper" template="/WEB-INF/templates/titledWrapper.jsp">
        <put-attribute name="includes" value="/WEB-INF/templates/includes.jsp" />
        <put-attribute name="navigation" value="/WEB-INF/templates/navigation.jsp" />
        <put-attribute name="body" value="" />
        <put-attribute name="pathRoot" value="./" type="string" />
</definition>

This is a base definition that I will extend other pages from. In the 'titledWrapper.jsp' page, I have this:

<img src="<tiles:getAsString name="pathRoot" />statics/images/corner.gif" />

I am also importing the Tiles tag lib. Other uses of getAsString work, though they are not in an attribute like this. When I load the page, my image source is literally <tiles:getAsString name=". What do I need to do differently to fix this?

Nik
  • 7,113
  • 13
  • 51
  • 80

1 Answers1

1

I think you should use ' ' instead of " ".

Nook
  • 534
  • 2
  • 7
  • 14