IDEA2017.3.3 create the first javaweb project and tomcat deployment practices,

Source: Internet
Author: User

IDEA2017.3.3 create the first javaweb project and tomcat deployment practices,

1. Create a simple web project

File --- New --- Project

1. select jdk (the jdk path found through java-verbose is on disk C, which cannot be identified here, when I install jdk, I have my own path on disk D. After the import, It is jdk1.9 in the figure)

2. click next.

3. You don't need to select anything. next

4. webDemo-finish

 

 

2. Create a Module

1. Select the new project webDemo, right-click and choose new-module

2. The Module SDK is the same as before. Select Web Application and next

(Web. xml is missing here and will be created later)

3. Name it firstWeb, finish

4. file -- project structure -- facets -- select the sub-directory

5. Click the plus sign on the Right of deployment descriptors -- OK

 

 

The directory structure is

6. Create the classes and lib folders under the WEB-INF

Classes is used to store compiled class files. lib stores third-party jar packages.

7. Configure the folder path

File -- Project Structure -- Modules -- Paths -- change both Output path and Test output path to the classes folder path.

8. Select Dependencies and click the plus sign on the right -- JARs or directories.

Select the created lib folder

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Select jar Directory -- OK

 

3. Configure the tomcat container

1. run --- Edit events...

 

Click "+" Tomcat Server --- Local

Enter the server name in Application server ---- click configure next to the name...

In the pop-up window, click "..." next to Tomcat Home, and select the tomcat installation directory.

Set HTTP port and JMX port

 

 4. Deploy and run on tomcat

After creating tomcat, you can quickly open the tomcat configuration page through the toolbar.

Go to the newly created tomcat configuration page

Select deployment, click the plus sign on the right, and select Artifact.

 

 

Enter Application context ---- apply

Return to the server panel and change On 'update' action and On frame deactivation to Update classes and resource ---- apply.

Develop a web project and run tomcat

Edit index. jsp

Running result

Perfect!

                 

 

 

(That is, there is a picture that is not easy to face, can not move, the word is written smaller, should not be seen)

 

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.