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

CSS multi-level menu implementation code

This is a pretty cool feature that makes web page...

Let's learn about the MySQL storage engine

Table of contents Preface 1. MySQL main storage e...

How to use geoip to restrict regions in nginx

This blog is a work note environment: nginx versi...

Detailed explanation of 10 common HTTP status codes

The HTTP status code is a 3-digit code used to in...

The difference and usage of Ctrl+z, Ctrl+c and Ctrl+d in Linux commands

What does Ctrl+c, Ctrl+d, Ctrl+z mean in Linux? C...

JDBC-idea import mysql to connect java jar package (mac)

Preface 1. This article uses MySQL 8.0 version Co...

Implementation of CSS scroll bar style settings

webkit scrollbar style reset 1. The scrollbar con...

HTML Marquee character fragment scrolling

The following are its properties: direction Set th...

Share 20 excellent web form design cases

Sophie Hardach Clyde Quay Wharf 37 East Soapbox Rx...

How to block IP and IP range in Nginx

Written in front Nginx is not just a reverse prox...

Vue realizes the function of uploading photos on PC

This article example shares the specific code of ...

Detailed explanation of MySQL 8's new feature ROLE

What problems does MySQL ROLE solve? If you are a...