Monday, September 23, 2013

A login application in java using MVC design pattern

This post explains how to build a login application in java which uses JSP, Servlets, Beans, DAOs and HTML pages. This login application follows (MVC) design pattern.
The model(DAO) consists of application data and business rules, and the controller(Servlet) mediates input, converting it to commands for the model or view. A view(JSP) can be any output representation of data, such as a chart or a diagram, generally an html or jsp page.
Here DAO is the Data Access Object – It mainly contains business logic with database connections and operations.
Use any IDE – Integrated development environment to minimize your work. I would recommend you for Java.
This application is explained thoroughly with appropriate comments and tested in Eclipse IDE. Please write comments if you find any difficulty while understanding the application.
You need to maintain the standard directory structure as shown below
standard directory structure for programming
standard directory structure for programming
Login details are forwarded to LoginServlet from Login page. When you click on Login button the request is forwarded to the page which is mentioned in action tag of the form so here the control will be forwarded to LoginServlet.java file.
More >>
A login application in java using MVC design pattern

No comments:

Post a Comment