tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kralidis,Tom [Burlington]" <>
Subject JSP/JSTL set var problem
Date Fri, 04 Nov 2005 19:04:05 GMT


I have an XML config file (attached) which I'd like to set a bunch of
JSP variables.

The xml config file is something like:

 <property name="city" value="Toronto"/>
 <property name="prov" value="Ontario"/>

Basically, I'd like to set variables with names in property/@name, and
value of property/@value.  So the above example would allow me to use
<c:out value="${city}"/> type of thing.

Here's my code snippet:

<c:import url="./config.xml" varReader="xmlSource">
 <x:parse var="doc" xml="${xmlSource}" scope="page" />

<x:forEach select="$doc/*[local-name()='config' and
ame()='property' and
 <c:set var="@name" scope="page" value="@value"/>

Any idea on how to make this work?  I get no errors on output but the
values are not being set.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message