Handling HTML forms is one of the most common tasks when you develop web applications. The JSF provides JSP tags for rendering HTML forms, manages the state of the forms, validates user-input reporting errors, lets you bind user interface components to JavaBean properties, and does many other things that increase your productivity.

JSF also has a rich API that you can use to build custom user interface (UI) components, custom validation classes (validators), and server-side event listeners. JSF contains two tag libraries called JSF Core and HTML Basic. The latter contains JSP tags that render HTML UI components such as buttons, text fields, checkboxes, lists, etc. In our example we use some of these tags to build the form.

The standard prefixes of these two tag libraries are f and h:

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


    <h:form formName="sampleForm">

////////////// here we bind managed bean to text-area input:

     <h:input_textarea id="text" valueRef="sampleBean.text" rows="3" cols="30">
     <br><h:output_errors for="text"/>

     <p><h:output_text value="This is a Label"/></p>