Let us create a hibernate web Application. Here we need JSP file for presentation.

There are steps given below for the web app creation.

index.jsp

This page will show a registration form. It takes the input from the form and sends it to the register.jsp page.

register.jsp

The register.jsp file will get all the information from index.jsp and stores it in the object (s) of Student class.

Student.java

It is a bean class. All the variables of bean class are set as private with public setter and getter methods.

StudentDao.java

It contains the method to store the object of Student class.

student.hbm.xml

It maps the object of Student class with the database table.

hibernate.cfg.xml

It contains information about the mapping file and relational database.

Output

Pin It on Pinterest

Share This