Eclipse builds SPRINGMVC Simple project

Source: Internet
Author: User

How to build a simple project for SPRINGMVC through Eclipse is now a brief introduction.

Tools/Materials
    • Eclipse
    • Related JAR Packages
Method/Step
  1. To create a new Dynamic Web project, select the project, click Next to fill in the item name, and click Next to select Generate Web. XML to end.

  2. Create the relevant folder under the project, including java,resources (storing spring and other resource files), view (store dynamic page), right click on Project, modify properties---sources For Java and resources (new resource folder)

  3. Introduce the relevant jar package, as below, including commons-logging-1.1.1.jar;spring-beans-

    4.0.5. Release.jar;spring-context-4.0.5.release.jar;spring-context-support-4.0.5.release.jar;spring-core-4.0.5.release.jar;sprin G-expression-4.0.5.release.jar;spring-web-4.0.5.release.jar;spring-webmvc-4.0.5.release.jar;spring-webmvc-portlet-4.0.5.r Elease.jar, etc.

  4. Modify the Web. xml file to add related content such as spring.

    Create a new Spring directory folder under the Resources directory, where you create a new springmvc.xml,applicationcontext-web.xml configuration file and edit the relevant content.

  5. Build index.jsp in the view directory and edit the contents of the page to save. To modify Web. XML, build a welcome page:

    <welcome-file-list>

    <welcome-file>view/index.jsp</welcome-file>

    </welcome-file-list>

    Save.

  6. Create a new class file for the spring controller file; Edit the return page byebye.jsp

  7. Start with Tomcat, in the browser input: http://localhost:9090/springMVC/, click the link, call controller return to Byebye page, the project was established successfully.

Eclipse builds SPRINGMVC Simple project

Related Article

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.