• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL core tag library works even though I don't have jstl jar in war

 
NisarAhmed Sajid
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a JSF 2.0 Project using maven and made a hello.xhtml page . I did not include the jstl dependency but on my hello.xhtml page I am using jstl core tag by including this namespace "xmlns:c="http://java.sun.com/jsp/jstl/core". And used the following tag which is working fine.

<c:set var="test" value="${2000*2}"/>
#{test}
Now I am wonder that how is this happening, even I checked the generated war file as well and there is no jstl jar . Can anyone know that how it is happening.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two curious facts:

1. It's not really safe to use JSTL on JSF View Definitions. Although it isn't as dangerous as it used to be, JSTL has an entirely different perspective of View creation than JSF does. JSF renders from a 2-dimensional reference object. JSTL was designed to render from a linear sequence of statements.

2. Despite #1, current JSF implementations require a copy of JSTL jar in them in order to work. Presumably, JSF employs it internally somehow. So your JSTL support was there, even if it is, as I said, unsafe.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic