SpringMvc (1) build a web project in Eclipse

Source: Internet
Author: User

Environment

Eclipse jee version -------- Jdk1.6 version --------- tomcat7.0-X64
Install and configure jdk, eclipse, and tomcat resources. Open eclipse and create a Dynamic web project. The project name is springMVC.


Here tomcat uses your own 7.0. (6.0 is also OK), and then 7.0 corresponds to Dynamic web module version3.0/6.0 and 2.5 corresponds. All of these are irrelevant. By default, you can. Do not Finish, Next->


The compiling output directory is different from the myeclipse directory when you create a web project in eclipse. The build \ classes directory is used when you create a web project in eclipse. myclipse is WEB-INF \ classes while the server's class loader is loaded by default/Under the WEB-INF/classes directory. the class file must be slightly changed here. Change to WebContent/WEB-INF/classes

Then the source folder above can be customized with src. Here I add a resource and test to add folder to store some xml configuration files and use them for testing.


NExt>


The web. xml file can be automatically generated by clicking the check box. By default, the web. xml file is not checked. Check it here, or copy it from other places for use. Do not change other settings by default. Then you can Finish them. After creation


There is no jsp page. You can create a helloworld index. jsp under webcontent. Right-click the springMVC project and choose run as-run on server.

Browser Input

Http: // localhost: 8080/springMVC/displays the hello world on the newly created index. jsp page.

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.