Building an SSH framework (diagram) in a Myeclipse10.1 environment

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.