has been used in the development of the servlet, but very cumbersome, inefficient, the framework was only known, but has not been how to use, just the new year is not how busy, the afternoon to check the data obstinately toss a. Feel that there is some harvest, and then recorded.
1. Create a new Web project in MyEclipse.
Fill in the project name, specification level Java EE 6.0
Select Yes in the warning dialog box that pops up
2, modify the project's JDK environment (this step can also be used for a while, but I myself generally is such a habit, back to change can also)
Right-click the project, select Properties,
Choose Java Build path--Libraries to change the JRE System library environment to your desired JDK environment
3. Use MyEclipse Database Explorer to establish a data source.
Click the button with the plus sign in the upper-right corner to select the MyEclipse DataBase Explorer
I use the database is Oracle, so here to configure the Oracle data source, can also configure MYSQL,SQLSERVER,DB2 and so on ... Of course, it is necessary to prepare the downloaded database driver jar package in advance, and then click the "Test Driver" button after configuring it, and the connection successfuly established indicates that the configuration data source is successful. Just click Finish to finish
4. Add spring support for the project
Add 5 jar packages required by spring.
5. Add hibernate support to the project
Hibernate here is unified by spring to manage all the configuration XML files without additional hibernate
6. Add Struts2 support for the project
Once added, you can see that the SRC root directory has more than one struts.xml configuration file
7, publish the project to the Tomcat container, and then start Tomcat, test framework is built successfully, this time has been able to access the project JSP page.
8, follow-up work.
Add spring configuration and monitoring to Web. Xml as follows.
<!--spring configuration and monitoring -- <context-param> <param-name>Contextconfiglocation</param-name> <param-value>/web-inf/classes/application*.xml</param-value> </context-param> <listener> <listener-class>Org.springframework.web.context.ContextLoaderListener</listener-class> </listener>
9, the end, this is just a brief introduction of the framework to get started, and then slowly learn ...
Building an SSH framework (diagram) in a Myeclipse10.1 environment