struts2.x+spring3.x+hibernate3.x
A First build a Web project
Two Build Struts
Right-click Project, select Myeclipse->add Struts capabilities
Pop up the Struts Settings dialog box and select Struts 2.1
Next
Complete the setup, the SRC directory will appear struts.xml,
Three Build Spring
Right-click Project, select Myeclipse->add Spring capabilities
Select Package below 5 packages
Note: If you want to deploy the Spring jar package together, you must copy these jar packages to web-inf/lib, you need to select Copy checked Library contents to project folder (TLDs always Copied
Four Setting up Hibernate
Right-click Project, select Myeclipse->add Hibernate capabilities
Set the interface by default, note that you need to select Copy checked Library Jars to project folder and add to Build-path
Here you can choose whether to create the XML separately or merge with spring
Here is the choice of the database to be connected, MyEclipse10 default only, the other database needs to be new in the Web Browse window, will appear here, this shows the pre-added MySQL database
This is the final step, will automatically establish the Hibernatesessionfactory class, we need to fill in the location of the package (with their favorite writing)
These files will appear after all the construction is completed.
You need to open Web. XML now
Add the following on the inside, adding the spring configuration, and will not be reported to find the spring error
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/applicationContext.xml</param-value>
</context-param>
Done, start the project.
Default JSP page
MYECLIPSE--SSH Frame Construction