Java Web Learning Series--myeclipse for spring using MAVEN to create a Web project

Source: Internet
Author: User
Tags java web
Create a MAVEN Web project

Create a new MAVEN project in Eclipse

Select the project type and select Maven-archetype-webapp in the Artifact ID

Enter the Group ID and Artifact ID as well as the Package,group ID to write a large project name, Artifact ID is a subproject name, the package is the default for you to build a bag, you can not write

The file structure of the newly created document is as follows

Added Src/test/java directory, which is used to write service-side test code

With the above steps, a basic MAVEN Web project structure is created.

Troubleshooting Project Issues

The index.jsp file created by default is reported with the following error: The superclass "Javax.servlet.http.HttpServlet" is not found on the Java Build Path

Right-click Web Project-"Properties or Build path-" Java build path->libraries-> Add libray ...

Select MyEclipse Server Library

Select the corresponding version of the Tomcat Runtime Library

Go back to order and Export in the Java Build path interface and tick the Tomcat Runtime Library that you just configured, so you can solve the above error problem.

Maven Web project compilation release test

Compile the project

After the Maven install compilation command is executed, the corresponding file is generated, and any of the red boxes that are published by Tomcat can be

Access the test-deployed project and output the contents of the page normally.

Java Web Learning Series--myeclipse for spring using MAVEN to create a Web project

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.