Technology used: struts2, hibernate, jsp, and mysql. This DEMO only implements the user login function. using MVC, I think it is relatively simple and easy to understand the data flow, by integrating this process, we can clearly see the data flow and design ideas of the entire project. It is the best example for new users to integrate struts2 and hibernate. Now we will integrate the ideas, processes, and code as follows. If the novice still does not understand or needs the source code, I will be happy to help and share the source code. JSP acts as view layer V and displays logon, logon succeeded, and failure pages; Struts2 acts as control layer C processing page Jump; Hibernate is used as Data Model M, it is provided in DAO form with the interface of the foreground program. I. database Design: 1. create Database test table name: user id int not null auto-incrementing username varchar (11) not null password varchar (11 not null) II. m-Layer Development: 2. basic Hibernate configuration: add the relevant jar package of Hibernate for the Web project, hibernate. cfg. xml, and right-click the project file, myeclise, add hibernate... Sessionfacotry will be created, so you don't have to write it yourself, achieving efficient development. Hibernate. cfg. xml: copy the Code <? Xml version = '1. 0' encoding = 'utf-8'?> <! DOCTYPE hibernate-configuration PUBLIC "-// Hibernate/Hibernate Configuration DTD 3.0 // EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <! -- Generated by MyEclipse Hibernate Tools. -->