Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JSP Interest »

jstl c:if

Herman Reintke

2004-06-28


LS,

I started experimenting with JSTL but very quickly run into issues
using the c:if tags.
The code snippet shows my current code. the problem is with the first c:if.
This does not evaluate to print the image found string. the second however
works as expected appending the the ?nnr=somevalue to the URL.

Does anyone see what mistake I am making ?

Kind regards,

Herman Reintke



<% String s = "images" ; %>

<%=s%>

<c:if test= "${s == 'images'}" >
image found
</c:if>

<c:if test= "${param.nnr == 'hello'}" >
hello found
</c:if>


===========================================================================
To unsubscribe: mailto listserv@(protected)".
For digest: mailto listserv@(protected)".

Some relevant archives, FAQs and Forums on JSPs can be found at:

http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com
©2008 junlu.com - Jax Systems, LLC, U.S.A.