Reputation: 11
I am using JSF and want to render html5 tags but they get ignored and not rendered at all into my browser.
So in the below example code, my page just shows one input box and the second one does not get rendered at all.
I'm using JSF 2.2 (Mojarra implementation javax.faces-2.2.0-m01.jar)
Any idea why such a behaviour?
My .xhtml page is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://xmlns.jcp.org/jsf/passthrough"
>
<h:body>
<input type="text" placeholder="Enter your Name from HTML5 tag" />
<h:form>
<h:inputText p:placeholder="Enter your Name from JSF" />
</h:form>
</h:body>
Upvotes: 0
Views: 335
Reputation: 11
Finally fixed it by using Mojarra 2.2.2 (you can also even use the very latest ones). ...as in 2.2.0 and 2.2.1 the XML namespaces are broken as detailed in the post Using new xmlns.jcp.org namespace on composites causes java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.putIfAbsent
Upvotes: 1