Convert a Maven Java Project to a Web Project__java

Source: Internet
Author: User

Ide:eclipse Juno

Step 1:add Dynamic Web Module

Right click Project-> Properties-> project facets-> tick ' Dynamic Web Module '-> click ' Further Configurati On available '-> Set Content directory to ' Src/main/webapp '-> ok-> OK

Step 2:add Web Module to Source

Right click Project-> Properties-> Java build Path-> Source-> Add Folder-> tick ' Src/main/webapp ' ; OK-> OK

Step 3:add Deployment Assembly

Right click Project-> properties->deployment Assembly-> Add-> Java build Path Entries-> Maven Dependen Cies-> Finish->ok

If your project depends on another local project, your should be extremely carefully here,

An internal error occurred during: "Updating status for Tomcat v7.0 Server at localhost ..."
. Java.lang.NullPointerException
If you are encountered this problem, the solution are to depend on a jar from Maven server, does not depend in a local project, O Therwise maven may isn't know how to copy it to Webinf/lib.

Reference 1:http://newspringwork.iteye.com/blog/1727480

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.