Creating Login Page In JSF using NetBeans
This example illustrates you how to create a login form in JSF using NetBeans. To create the jsp page in NetBeans:
1. Right click on Web Pages under your project.
2. Go to New- JSP and click.
3. Enter JSP File Name (login, for this example) when New JSP File window appear.
4. Click Finish. Then the page will be created and listed as below:
Write your code for login. In this example, login.jsp is created. The code is given below:
Source Code of login.jsp
<%--
|
Description of all tags which is used in this program:
<f: view> tag is used to create top level view and is a
container for all JSF component tags on a page.
<h:form> tag creates html form.
<h:panelGrid> tag creates html table with specified number of
columns.
<h:outputText> tag is used for creating component for displaying
formatted output as text.
<h:inputText> tag is used to creates text input control
(single line).
Run the program just by right click on login.jsp page and select run. The following output will be displayed on browser: