I am building out a dynamic table using JSTL and was hoping to make use of the c:out tag to help build out some expressions, but am not able to find that tag available among the other JSTL core tags.
I have the following namespace being used:
xmlns:c="http://java.sun.com/jsp/jstl/core"
and made sure my web.xml file was set to use the 2.5 spec found here https://stackoverflow.com/tags/jstl/info
but still only find catch, choose, forEach, if, otherwise, set, and when.
Additionally, I tried importing the JSTL 1.2.1.jar libraries as well with no success.
So, should the c:out tag be available for me to use in JSF2 ? If so, what steps am I missing?
Regards,
Mike
The <c:out>
indeed not available in JSF2 Facelets. You don't need it in JSF2 Facelets anyway. Just use the JSF equivalent <h:outputText>
,
<h:outputText value="#{bean.text}" />
or even better, just put EL in template text,
#{bean.text}
It will already be implicitly XML-escaped if that's your sole concern (and was during old JSP2 ages actually the sole reason why <c:out>
is been used; in JSP1 the tag was simply mandatory in order to display a bean property as EL in template text wasn't supported in JSP1). The <c:out>
offers no additional advantages over those standard JSF2 Facelets ways, that's why it's been removed from the JSTL subset for Facelets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With