clipped from: www.vaannila.com   
Struts Login Application Using Action Form Tutorial

In this tutorial you will learn how to create a Login Page using Action Form in Struts. You will also learn how to perform validation using the validate() method in the Action Form.

clipped from: www.vaannila.com   

Login Application Using Action Form


In this example we will see how to create a login application using ActionForm. The following files are required for the login application.


The first page that will be called in the login application is the login.jsp page. This configuration should be done in web.xml as shown below.


We use Struts HTML Tags to create login page. The form has one text field to get the user name and one password field to get the password. The form also has one submit button, which when clicked calls the login action. <html:errors /> tag is used to display the error messages to the user.