Facelets is an open source web templating system for JavaServer Faces (JSF). The language requires a valid input XML document to work. Facelets supports all JSF UI components and is entirely focused on building a JSF component tree that reflects the view of a JSF application.
Facelets is an XML-based view technology. It does not work with HTML4 doctype. You can use in JSF/Facelets, even without an declaration at the top of the page.
<!DOCTYPE html> <html lang = "en" xmlns:jsf = "http://xmlns.jcp.org/jsf" xmlns:f = "http://xmlns.jcp.org/jsf/core" xmlns:h = "http://xmlns.jcp.org/jsf/html"> <h:head> <title>Title</title> </h:head> <h:body> <header jsf:id = "header">Header</header> <navjsf:id = "nav">Nav</nav> <main jsf:id = "main">Main</main> <footer jsf:id = "footer">Footer</footer> </h:body> </html>
The above is the detailed content of Can I use JSF+Facelets with HTML 4/5?. For more information, please follow other related articles on the PHP Chinese website!