0% found this document useful (0 votes)
17 views1 page

Instructions For Creating and Executing Hibernate With Struts+Maven (Example: Struts2Hibernate - War)

To create and execute a Hibernate application with Struts and Maven, configure a dynamic web project with Maven by right clicking the project and selecting "Configure" and then "Configure to Maven Project". Edit the hibernate configuration file to specify the MySQL driver, URL, username, and password. Create a database called "TestDB" and a table called "User" with specified fields. Insert sample data into the User table.

Uploaded by

muthuskumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views1 page

Instructions For Creating and Executing Hibernate With Struts+Maven (Example: Struts2Hibernate - War)

To create and execute a Hibernate application with Struts and Maven, configure a dynamic web project with Maven by right clicking the project and selecting "Configure" and then "Configure to Maven Project". Edit the hibernate configuration file to specify the MySQL driver, URL, username, and password. Create a database called "TestDB" and a table called "User" with specified fields. Insert sample data into the User table.

Uploaded by

muthuskumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Instructions for creating and executing Hibernate

with Struts+Maven (Example:


Struts2Hibernate.war)
1. Create a Dynamic web project and immediately configure that with Maven
by

making a right click on project name on the left pane and select

Configure and then followed by Configure to Maven Project


2. POM.xml will be generated.
3. Before that, do the following changes in hibernate.cfg.xml
<property
name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property
name="hibernate.connection.url">jdbc:mysql://localhost/TestDB</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">SAIRAM#90</property>

4. In MySQL, Create a database TestDB


5. In that database, create the table User with fields as (user_id, name,
password, email)
6. Insert one or rows into that table.
-----------------------------

You might also like