You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by PhoenixelRay <si...@web.de> on 2008/11/14 11:16:34 UTC
Struts2/Tiles2 OGNL Problem
Hi,
i have a little question because of a Problem I faced with OGNL in
Struts 2. I have tried a lot of things but it didn work.
OK. I´ve set up a new Struts 2 Project with Tomcat 6.0 and integrated
Tiles 2. I want to use the menuing support of tiles.
This is the relevant code of the tiles-defs.xml:
------------------------
<definition name="menue" template="/tiles/menue.jsp">
<put-list-attribute name="myListAttribute">
<item value="menue.uebersicht" link="uebersicht.action" />
...
</put-list-attribute>
</definition>
------------------------
Here I want to define all sections of the main menue. The value of the
item property should be a ressource key which I have in the
"package.property" file in my project directory (WEB-INF/src/java).
The code of the the menue.jsp is:
------------------------
<tiles:importAttribute name="myListAttribute" />
<c:forEach var="item" items="${myListAttribute}">
${item.link} <s:property value="${item.value}"/>
<br/>
</c:forEach>
------------------------
This loop should integrate the menu sections.
The exception I get is:
/tiles/menue.jsp(18,30) According to TLD or attribute directive in tag
file, attribute value does not accept any expressions
Without <s:property/> it would work.
I think the Problem is that the Struts-Tags dont support EL. Is it
possible to solve this Problem with OGNL? I dont know how I can access
the "item.link" and "item.value" properties with OGNL. Is there a way to
use EL with Stuts 2?
So many questions. I didnt find a solution in the net for this specific
problem and the OGNL documentation is not very helpfull for me. Maybe
someone can give me a little clue.
Thank you in advance.
Best regards
Ray
--
View this message in context: http://www.nabble.com/Struts2-Tiles2-OGNL-Problem-tp20497807p20497807.html
Sent from the tiles users mailing list archive at Nabble.com.
Re: Struts2/Tiles2 OGNL Problem
Posted by Antonio <an...@gmail.com>.
2008/11/14 PhoenixelRay <si...@web.de>:
> I think the Problem is that the Struts-Tags dont support EL. Is it
> possible to solve this Problem with OGNL? I dont know how I can access
> the "item.link" and "item.value" properties with OGNL. Is there a way to
> use EL with Stuts 2?
>
> So many questions. I didnt find a solution in the net for this specific
> problem and the OGNL documentation is not very helpfull for me. Maybe
> someone can give me a little clue.
Please ask the Struts users mailing list: as you said, your problem is
the fact that Struts 2 tags do not support EL. This is not a Tiles
problem.
Antonio
Re: Struts2/Tiles2 OGNL Problem
Posted by PhoenixelRay <si...@web.de>.
ok, thank you
--
View this message in context: http://www.nabble.com/Struts2-Tiles2-OGNL-Problem-tp20497807p20498099.html
Sent from the tiles users mailing list archive at Nabble.com.