Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why are my JSTL tags not being interpreted in my JSF page?

 
Jehan Jaleel
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a JSF page (.xhtml extension). In it I have the following..



But this JSTL code is not being interpreted. When the page loads it shows both Invoice and Credit Memo and I do view source I see "<c:choose" in my source. I made sure JSTL 1.2 jar is there in my WEB INF/lib.

What else could be missing? Is JSTL not supported on xhtml pages?

Thanks.>
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jehan Jaleel wrote:Is JSTL not supported on xhtml pages?

Dont know.

but, I dont see JSTL taglib directory definition.

SetupJstlForJsp2
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64990
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask JSF questions in the JSF forum. I have moved this post there for you.
 
Jehan Jaleel
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seetharaman Venkatasamy wrote:
Jehan Jaleel wrote:Is JSTL not supported on xhtml pages?

Dont know.

but, I dont see JSTL taglib directory definition.

SetupJstlForJsp2


Does this not do the trick for JSTL taglib directory..

<ui:composition
xmlns:c="http://java.sun.com/jstl/core">
 
Jehan Jaleel
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figuered it out. Seems JSTL tags do not work inside JSF datatable. When I changed to the following it worked...
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18226
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is practically no reason for ever using JSTL in JSF pages, because the same functions are available via native JSF tags - which, unlike JSTL - are aware of the JSF environment.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic