Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL not working

 
william gates
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've used jstl before, but I've just started using it in the last few months.

I've been working on this one issue where I thought I might be saving the DB results wrong in the bean or I wasn't setting up the ArrayList correctly in the servlet. And then it came back to was i setting up the <c:for each> and other tags correctly.

But right now I don't know. I went back to just trying a simple sample to just test it.

here is the jsp

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""xhtml1-transitional.dtd">
<html>
<head>
<title> Test JSTL</title>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
</head>
<body>
<c:forEach var="i" begin="1" end="10" step="1">
<cut value="${i}" />
</c:forEach>
</body>
</html>

and here are the results
____________________________
${cnt.count} value is : ${member} ${i}
${i}
${i}
${i}
${i}
${i}
${i}
${i}
${i}
${i}
_________________________________


I've moved the taglib into WEB-INF and tried that to no avail. I moved the reference to the taglib above and below the html file.

We are using websphere 6.0 and as I've said in other posts, if i need to install JSTL or something like it on webspehre, then it is useless to me because I am not the server admin and have no access to the server besides deploying my web app.

Just trying to figure out if I'm doing something wrong?
[ April 13, 2007: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64632
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like the EL is not enabled.

Originally posted by william gates:
We are using websphere 6.0


Is Websphere 6 a JSP 2.0 container?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic