Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2005

Tip: Looking for answers? Try searching our database.

Problem with interpolation of JSTL variables

Thread view: 
Lord0 - 16 May 2005 22:09 GMT
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 - 16 May 2005 22:20 GMT
found the solution to my problem:

Added

<%@ page isELIgnored="false"%>

to top of .jsp

Sorry for the timewaste


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.