JSF Code - Annotated 1
[Previous] [Main] [Next]

JSF Code - Annotated


Finally - something interesting!

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

<f:view>
<head>
<title>A Simple JavaServer Faces Application</title>
</head>

Items:
1. Two taglibs at the beginning of the file.
core and html. Each has a designated letter so that references to commands in the taglib can be found. The letters can be anything, but are usually "f" - for faces and "h" - for HTML.

2. <f:view> - All JSF commands must be surrounded by <f:view> and </f:view>. The "f" indicates that this command is found in the faces core taglib.