Java Iintellij Idea (3)-----Use Gradle to create Java Web applications

Source: Internet
Author: User
Tags data structures java web tomcat server

1, the following figure, File->new->project

2, the following figure, after the completion of the first step, will pop up such a form, and then in the left column to find Gradle, and then on the right tick Java and web two options, next.

3, the following figure, to the input groupid and Acrtifactid window, for the interpretation of these two names, you can see my last maven to create a Java Web project is explained in the third step, next.

4, the following figure, this page, just came in the default choice of use is the use default Gradle wrapper (recommended), I do not choose this is because I have installed local gradle, all do not need to use it by default, if you choose it, then create a project, It will automatically download Gradle, and then configure the download process is generally very slow, at least I am slow on my computer. All I choose is use the local gradle distribution,. And then there is a check, is automatically create an empty root folder, if not selected, the creation of the project will not have a Java folder, so tick, let it automatically create it, next.

5, the following figure, it is the default is the name of Artifactid, the unique identification of the project, and then module name, if you do not know what should be filled, you can follow the default, click Finish, the creation is done.

6, after the creation, if you have not configured Tomcat before, there is no way to run, so also need to configure Tomcat, the following figure, the left is the successful creation of the project file directory, if not previously checked create directories for empty Content roots automatically, then Java and resource are not generated in this two-hole folder. This is not the point of clicking Edit Configuration.

7, pop up the following picture configuration box, click on the upper left corner plus, scroll down to find Tomcat server->local, click Local.

8, the following figure, pop-up configuration box, the default is to configure the server properties, enter the name of this configuration, name, you can take any name, click Configure select Local Tomcat path, are configured to directly click OK can run.

9, the following figure, and then select the deployment next to the server, after the page, click the plus sign, in the pop-up page to choose the name of the longer one, that is, behind the (exploded), click OK.

10, the following figure, on the right input application context name, this corresponds to the runtime, the default path (http://localhost:8080/demo/) in the demo, so if you do not configure this, Its default path will be (http://localhost:8080/). Finally click Apply, finally click Apply, and then click OK.

11, the penultimate step, the following figure, open the index.jsp page, rectangular circle out of the system generated by default, no pipe, you can delete, and then the circle is my own write. I just to let you know, the JSP page looks like, lest you see it, think is to generate the wrong file, click on the Run button with the top corner.

12, the final step, witness the following results.

————————————————————————————————————————————————— – Java Architect Project Combat, high concurrency cluster distributed, large data high availability video tutorials, total 760G

Download Address:

https://item.taobao.com/item.htm?id=555888526201

01. High-level architect 42 Phases
02.Java Advanced System Training Architecture Course 148 hours
03.Java Senior Internet Architect Course
04.Java Internet Architecture Netty, Nio, Mina, etc.-Video tutorials
05.Java Advanced Architecture Design 2016 finishing-video tutorials
06. Architect Foundation, advanced film
07.Java Architect Required Linux Operation series courses
08.Java Advanced System Training Architecture Course 116 hours
+
Hadoop series tutorials, Java design patterns and data structures, Spring Cloud Micro service, Springboot Primer

—————————————————————————————————————————————————–

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.