Java Reference
In-Depth Information
is the JSF HTML tag library. This tag library includes a number of tags that are used
to implement HTML specific functionality, such as creating HTML forms and input
fields. By convention, the prefix h (for HTML) is used for this tag library.
The first JSF tag we see in the generated JSP file is the <f:view> tag. When writing
a Java web application using JSF, all JSF custom tags must be enclosed inside an
<f:view> tag. In addition to JSF-specific tags, this tag can contain standard HTML
tags, as well as tags from other tag libraries, such as the JSTL tags discussed in the
previous chapter.
The next JSF-specific tag we see in the above JSP is <h:outputText> . This tag simply
displays the value of its value attribute in the rendered page.
The application generated by the new project wizard is a simple, but complete, JSF
web application. We can see it in action by right-clicking on our project in the project
window and selecting Run . At this point the application server is started (if it wasn't
already running), the application is deployed and the default system browser opens,
displaying our application's welcome page.
Modifying Our JSP to Capture User Data
The generated application, of course, is nothing but a starting point for us to create a
new application. We will now modify the generated welcomeJSF.jsp file to collect
some data from the user.
 
Search WWH ::




Custom Search