Idea configures tomcat to start a web project graphic tutorial

Idea configures tomcat to start a web project graphic tutorial

Configure tomcat

1. Click run configuration

insert image description here

2. Select tomcat local

insert image description here

3. Configure tomcat

insert image description here

4. Deploy web project

There are 2 ways to deploy
war package: package it into war and run it on the server. This method is more common.
war exploded: upload the web project to the server in the location relationship of the current folder. Just move the folders, jsp pages, classes, etc. directly to the Tomcat deployment folder for loading and deployment. Therefore, this method supports hot deployment and is generally used during development.

The way to get the absolute context path is different:
String contextPath = request.getSession().getServletContext().getRealPath("/");

We are using war exploded for demonstration.

insert image description here

We have already generated it here. If it is not generated, you can generate it manually.

insert image description here

Select Deployment

insert image description here
insert image description here

The suffix of application context and url should be the same, otherwise 404 will appear.
Start tomcat

Summarize

This is the end of this article about idea configuration tomcat to start web project. For more related idea configuration tomcat to start web project content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to use IDEA to create a web project and publish it to tomcat
  • How to remove the embedded Tomcat in Spring Boot and start it in a non-web way
  • Detailed explanation of the process of deploying Tomcat and creating the first web project in IDEA 2020.3.1
  • Tomcat first deployment web project process diagram
  • Solve the problem that the files under WEB-INF/classes are not compiled after tomcat releases the project
  • Solve the problem that SpringBoot webSocket resources cannot be loaded and tomcat startup errors
  • IDEA graphic tutorial on configuring Tomcat server and publishing web projects
  • Alibaba Cloud Server Linux System Builds Tomcat to Deploy Web Project
  • Briefly describe how to install Tomcat image and deploy web project in Docker
  • Analysis of the process of deploying pure HTML files in Tomcat and WebLogic
  • IDEA2020.1.2 Detailed tutorial on creating a web project and configuring Tomcat
  • How to configure Tomcat and run your first Java Web project on IntelliJ IDEA 2018
  • Java web project starts Tomcat error solution
  • Tomcat source code analysis of Web requests and processing

<<:  Determine whether MySQL update will lock the table through examples

>>:  Steps for Django to connect to local MySQL database (pycharm)

Recommend

Vue uses WebSocket to simulate the chat function

The effect shows that two browsers simulate each ...

Example of implementing text wrapping in html (mixed text and images in html)

1. Text around the image If we use the normal one...

Detailed explanation of using Vue.prototype in Vue

Table of contents 1. Basic Example 2. Set the sco...

Two implementation solutions for vuex data persistence

Table of contents Business requirements: Solution...

A detailed introduction to setting up Jenkins on Tencent Cloud Server

Table of contents 1. Connect to Tencent Cloud Ser...

How to install mongodb 4.2 using yum on centos8

1. Make a repo file Refer to the official install...

How to check if data exists before inserting in mysql

Business scenario: The visitor's visit status...

Problems and solutions of using TweenMax animation library in angular

I have nothing to do recently, so I tinker with C...

CentOS 7 Forgot Password Solution Process Diagram

need Whether it is a Windows system or a Linux sy...

In-depth understanding of javascript prototype and prototype chain

Table of contents 1. What is a prototype? 2. Prot...

Implementation of positioning CSS child elements relative to parent elements

Solution Add position:relative to the parent elem...

Installation of mysql-community-server. 5.7.18-1.el6 under centos 6.5

Use the following command to check whether MySQL ...

The implementation process of long pressing to identify QR code in WeChat applet

Preface We all know that the QR codes in official...