| Author |
Websphere 6 not recognizing c:forEach
|
Mike Ottinger
Ranch Hand
Joined: Jan 11, 2002
Posts: 125
|
|
Hi guys, I have a simple jsp with the following: In tomcat, this displays my list data fine. In websphere 6, its a different story. Looking at the source of the generated html, I see this: It isn't evaluating the tag at all, and its taking the list held in 'data' and printing it out within the items attribute. I can't say that I've seen this before, usually jstl tags either work or don't work in my experience. Just doing simple ${my_var} seems to work but not with forEach. This is the taglib declaration I'm using: I've also tried it with the uri set as http://java.sun.com/jsp/jstl/core and I've tried the core_rt version as well, all the same result. Tomcat is fine with is, WebSphere 6 is not. Any help on this is greatly appreciated. Thanks. [ June 16, 2006: Message edited by: Marilyn de Queiroz ]
|
SCJP 1.4 SCJD 1.5
|
 |
Mike Ottinger
Ranch Hand
Joined: Jan 11, 2002
Posts: 125
|
|
Well, using the code blocks messed things up, this is what my jsp file looks like: <c:forEach var="d" items="${data}"> ${d} </c:forEach> and the view source on it looks like this: <c:forEach var="d" items="[I live in the database!, So do I!]"> </c:forEach> thanks!
|
 |
Mike Ottinger
Ranch Hand
Joined: Jan 11, 2002
Posts: 125
|
|
Ok, third time: Basically when I use the below syntax in websphere: c:forEach var="${d}" items="${data}" I actually get this in the html: c:forEach var="d" items="[I live in the database!, So do I!]" it's not evaluating forEach it's just replacing my ${}'s
|
 |
Marilyn de Queiroz
Sheriff
Joined: Jul 22, 2000
Posts: 9033
|
|
Originally posted by Mike Ottinger: Well, using the code blocks messed things up, this is what my jsp file looks like: <c:forEach var="d" items="${data}"> ${d}</br> </c:forEach> and the view source on it looks like this: <c:forEach var="d" items="[I live in the database!, So do I!]"> </br> </c:forEach> thanks!
You probably figured out by now that it's not the code tags messing things up, it is the angle braces. If you substitute < for <, you'll get better results in this particular (IBM/Websphere) forum.
|
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
|
 |
 |
|
|
subject: Websphere 6 not recognizing c:forEach
|
|
|