Build Java Web project with Gradle in IDEA14 and deploy to Tomcat

Source: Internet
Author: User
Tags tomcat server

Novice with Idea,idea really seconds to kill eclipse, but there are a lot of configuration unfamiliar, can make me toss bad. A few notes, are the learning process is more willing to fall in the wrong.

    1. Idea creates a new Web project and builds it with Gradle :
      First create a new Gradle project, this time there is no webapp/web-inf/ directory structure, and then F4 Open The module setting, select the left Facets, choose the middle green + number, select the Web, will automatically generate Web module Deployment Descriptor . XML file, and generates a web/web-inf/web.xml directory structure.

    2. Deployed totomcatapplication servertomcatidea Edit Configuration , upper left corner plus, select tomcat server localserver take a name and then the most important step deployment: in deployment artifacets find webapp directory (web-inf< Span lang= "ZH-CN" > upper level directory), save. Then add the settings for the Welcome home page in the Web. xml file:
      /span>
      <welcome-file-list>
      <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>
      Then create a new index.jsp file in the Web-inf folder ancestor directory. To start Tomcat, you can see the index page.

Build Java Web project with Gradle in IDEA14 and deploy to Tomcat

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.