IntelliJ idea use (ii): Tomcat and Jetty configuration

Source: Internet
Author: User
Tags tomcat server

In the previous session, we created the MAVEN Web project with idea, and then we published the project to Tomcat and jetty to run it for further development and debugging

Configure Tomcat

First, open the menu bar

Second, click the Settings button, add the application server, select Tomcat Server

Select the Tomcat directory

Add the following as shown below

We have added the Tomcat server to idea, and then we have to set up the deployment information for the MAVEN Web project.

Third, set up the deployment file

CTRL + SHIFT + ALT + S Shortcut Open Project Structure

Set Modules:

Check the directory of files to be run in Tomcat

Add a Dependency package

Click Apply

The effect is as follows:

To add an artifact:

To make it effective:

Fourth step, deploy the project to Tomcat

Click Run on the menu bar

Find Tomcat

Add a deployed artifact

Select browser

Fifth step, run Tomcat

Configure Jetty

Jetty is a lightweight application server, more suitable for our development debugging, its configuration is similar to Tomcat, first to the Jetty official website Download (https://www.eclipse.org/jetty/download.html), to find the corresponding JDK version of the download, my JDK is 1.7

Add Jetty Server

Select Jetty Directory

To add a jetty server to the run configuration, click Run on the menu bar:

Add a deployed artifact

Change the jetty configuration file

When doing jetty configuration, idea will error, is JMX (Java Management Extensions, that is, Java Management extension) of the error, online check is said to be in the jetty configuration file plus:--MODULE=JMX, Should be used as a declaration that allows idea to call the jetty container. On the file Start.ini of the jetty home directory,

Once deployed, click Run

Summary: Just turned from eclipse a bit less suited to idea, after many operations familiar, slowly discovered that the idea is indeed more useful than eclipse. The above is about how to deploy the Web project, I began to grope for a long time, technology this thing there is no shortcut, a lot of practice a few times better.

IntelliJ idea use (ii): Tomcat and Jetty configuration

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.