Hello.

An idea : perhaps it has nothing to do with Tiles, but with EL. Try to change your variable name with "fieldMessage" instead of "field-message". I think the EL translation is the substraction of two unknown values, "field" and "message", that results "zero"...

I hope this helps.
Regards.

Ephemeris Lappis

Le 20/08/2012 20:05, Andrey Botalov a écrit :
I use Apache Tiles 3.
In servlet I do:

    request.setAttribute("field-message", "Message");

Then request is forwarded to /WEB-INF/pages/something.jsp:

    <tiles:insertDefinition name="something" />

In tiles.xml I have:

    <definition name="something" template="/WEB-INF/layouts/default.jsp">
<put-attribute name="main-content" value="/WEB-INF/tiles/something.jsp" />
    </definition>

In /WEB-INF/tiles/something.jsp I have:

    <p>${field-message}</p>

And I see 0 instead of "Message" in result HTML file.

What should I do to get "Message" shown there?


Reply via email to