Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Problem with interpolation of JSTL variables (http://www.velocityreviews.com/forums/t143552-problem-with-interpolation-of-jstl-variables.html)

Lord0 05-16-2005 09:09 PM

Problem with interpolation of JSTL variables
 
Hi there,

I'm having a strange problem with JSTL and the interpolation of variables.

Some details:
Tomcat 5.0.28
JSTL 1.1.2
Eclipse 3.0.0 + Sysdeo Tomcat Plugin

Problem: the JSTL variables within the jsp do not seem to interpolate, for
example:

<table>
<tr>
<th>Value</th>
<th>Square</th>
</tr>
<c:forEach var="x" begin="0" end="10" step="2">
<tr>
<td><c:out value="${x}"/></td>
<td><c:out value="${x * x}"/></td>
</tr>
</c:forEach>
</table>

Produces the following output:

<table>
<tr>
<th>Value</th>
<th>Square</th>
</tr>
<tr>
<td>${x}</td>
<td>${x * x}</td>
</tr>
<tr>
<td>${x}</td>
<td>${x * x}</td>
</tr>
<tr>
<td>${x}</td>
<td>${x * x}</td>
</tr>
<tr>
<td>${x}</td>
<td>${x * x}</td>
</tr>
<tr>
<td>${x}</td>
<td>${x * x}</td>
</tr>
</table>

So the iterator appears to work, in some fashion, however the variables are
not interpolated.

At the top of my .jsp file I include the following line:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

And I have copied the files jstl.jar and standard.jar to the /WEB-INF/lib
folder of the web-app as per the docs.

Any ideas?

Cheers

Lord0



Lord0 05-16-2005 09:20 PM

Re: Problem with interpolation of JSTL variables
 
found the solution to my problem:

Added

<%@ page isELIgnored="false"%>

to top of .jsp

Sorry for the timewaste




All times are GMT. The time now is 05:31 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.