Java Server Faces Question:

Download Job Interview Questions and Answers PDF

Tell me how the components of JSF are rendered?

Java Server Faces Interview Question
Java Server Faces Interview Question

Answer:

JSF libraries need to be added in an application.
On the .jsp page, a tag library needs to be added:

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>

In an XML style:

<?xml version="1.0"?>
<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">

The JSF components can be accessed using the prefix attached.
In an IDE, JSF can be added easily. However, when working without them the faces-config.xml needs to be updated and populated with classes i.e. Managed Beans between the following tags

<faces-config> </faces-config>

Download Java Server Faces Interview Questions And Answers PDF

Previous QuestionNext Question
Explain how JSF different from conventional JSP?Do you know how to declare the Navigation Rules for JSF?