MJ
asked on
JSTL test always evaluates to true????
I have tried this 2 different ways, this works properly:
<c:set var="pageId"><%=pageID%></ c:set>
<c:if test="${pg.pageID.value eq pageId}">
But the following doesn't, it always evaluates to true:
<%@ taglib uri="http://java.sun.com/jstl/core-rt" prefix="c-rt" %>
<c-rt:if test="${pg.pageID.value eq '<%=pageID%>'}">
I out put the values after the statement and they are different? Any idea why???
<c:set var="pageId"><%=pageID%></
<c:if test="${pg.pageID.value eq pageId}">
But the following doesn't, it always evaluates to true:
<%@ taglib uri="http://java.sun.com/jstl/core-rt" prefix="c-rt" %>
<c-rt:if test="${pg.pageID.value eq '<%=pageID%>'}">
I out put the values after the statement and they are different? Any idea why???
ASKER
NO biggie I didn't have to use it on my server. So what do you mean you can't mix them? I didn't, I tried the first but that didn't work so I tried the second which worked. Are you saying that if you use RT all jstl has to be RT????
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I gotcha!!!!! THANKS AGAIN!
To allow RT script to access EL variable, <jsp:useBean> will be used to map the EL variable as bean.
ps: The taglib uri should be http://java.sun.com/jstl/core_rt instead of http://java.sun.com/jstl/core-rt. Sorry for given the incorrect path on my last post.