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.
- 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.
- 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