Trying to find c: out tag from JSTL library in JSF application

I am creating a dynamic table using JSTL and was hoping to use the c: out tag to help create some expressions, but I cannot find this tag available among other JSTL tags.

I use the following namespace:

xmlns:c="http://java.sun.com/jsp/jstl/core" 

and make sure my web.xml is configured to use the 2.5 specification found here. stack overflow sjtl

but still only find catch, choose forEach if, otherwise, install and when.

In addition, I tried to import the JSTL 1.2.1.jar libraries, also without success.

So, should the c: out tag be available for use in JSF2? If so, what steps am I missing?

Hello,

Mike

+4
source share
1 answer

<c:out> really not available in JSF2 Facelets . In any case, this is not necessary in JSF2 Facelets. Just use the JSF equivalent <h:outputText> ,

 <h:outputText value="#{bean.text}" /> 

or even better, just put EL in the template text,

 #{bean.text} 

It will already implicitly shift to XML if your only concern (and in the old days, JSP2 was actually the only reason that <c:out> ; in JSP1, the tag was simply required to display the bean property as EL in the template text not supported in JSP1). <c:out> does not offer any additional advantages over these standard JSF2 Facelets methods, so it has been removed from the JSTL subset of Facelets.

See also:

+10
source

All Articles