Problem with interpolation of JSTL variables

L

Lord0

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:eek:ut value="${x}"/></td>
<td><c:eek:ut 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
 
L

Lord0

found the solution to my problem:

Added

<%@ page isELIgnored="false"%>

to top of .jsp

Sorry for the timewaste
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top