aspose file tools*
The moose likes JSF and the fly likes JSTL core tag library works even though I don't have jstl jar in war Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSTL core tag library works even though I don Watch "JSTL core tag library works even though I don New topic
Author

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

NisarAhmed Sajid
Greenhorn

Joined: Feb 07, 2013
Posts: 1
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

Joined: Jun 25, 2001
Posts: 16250
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
Consider Paul's rocket mass heater.
 
subject: JSTL core tag library works even though I don't have jstl jar in war