• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reg:Facing problem with http://java.sun.com/jstl/core <choose > and <when > tags

dhanaraja rajendran
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
i have declared the required tag libs like this on top of my xhtml page

<html xmlns="http://www.w3.org/1999/xhtml"

from my below code
<hutputText value="#{fn:length(my String)}"/> <========>>> is priting as 450 which correct
<hutputText value="#{fn:length(my String) > 350}"/> <========>>> is priting as "true" which is also perfect
<c:when test="#{fn:length(myString) > 350}"> <=========>> but it is not going inside c:when ..instead of it is going to ctherwise
<hutputText value="#{fn:substring(my String, 0, 350)}..."/>
<hutputText value="#{my String}"/>
</c therwise>

Note: 1.If I am manualy setting test="#{true}" or test="true" it is properly workng and going inside <c:when>
2. If iam using test="${true}" ie,instead of # symbol if i am using $ also same problem occurs for me..

can anybody please help me out from this problem
Tim Holloway
Posts: 18471
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Dhanaraja!

We have a "Code" button that generates special tags in the message editor for wrapping sample code, XML, and other formatted text. It makes such things a lot easier to read. No smiley faces for one thing.

I do not recommend using JSTL with JSF. JSF has native equivalents that work much better.
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!