Reputation: 1643
Can I use Spring tags with facelets? I have one JSP page, and there is a directive:
<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%>
Then I can insert the tag <s:theme code='css' />
(I'm using theme resolver.) Now I need to use theme resolver in another project using facelets instead JSP. There is a namespace declaration instead the JSP directive, isn't?
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:em="http://java.sun.com/jsf/composite/emcomp"
xmlns:st="http://www.springframework.org/tags">
But in Eclipse the namespace is labeled with the warning marker and on server it does not work, because the tag library is missing, althought I have put the library Spring Web MVC in the lib
directory of Eclipse Internal Glassfish server. The JAR really contains META-INF/spring.tld
.
I'm unable to find, what's wrong.
Upvotes: 1
Views: 557
Reputation: 27614
No, unfortunately you cannot. Spring tags are based on a JSP taglib. Facelet taglibs are different from JSP taglibs. The reason you can use the old-fashioned jsp core tags (c:forEach etc) in facelets is because they have been ported to facelet taglibs. AFAIK, there has not been any port done yet of the Spring JSP taglib to a facelet taglib.
Upvotes: 1