Maybe this links is helpfull Java webapp. It's a guide how to make a HelloWorld app in intelliJ. The guide is with a GlassFish server but Tomcat should work to.

Answer from Casper Schobers on Stack Overflow
🌐
JetBrains
jetbrains.com › help › idea › creating-and-running-your-first-jakarta-ee-application.html
Tutorial: Your first Jakarta EE application | IntelliJ IDEA Documentation
For GlassFish 5, select the Java EE 8 specification. For GlassFish 7, select Jakarta EE 10. In the Dependencies list, you can see that the web application template includes only the Servlet framework under Specifications. Click Create. IntelliJ IDEA creates a project with some boilerplate code that you can build and deploy successfully.
🌐
JetBrains
jetbrains.com › help › idea › enabling-web-application-support.html
Enable Web application support | IntelliJ IDEA Documentation
When you enable Web Application support in IntelliJ IDEA, it can do the following: Create a web resource directory web with index.jsp intended as a starting page of your app and, optionally, a web app deployment descriptor WEB-INF/web.xml.
🌐
JetBrains
jetbrains.com › help › idea › developing-web-applications.html
Web applications | IntelliJ IDEA Documentation
Enable Web application development support to get the necessary libraries, the basic folder hierarchy, and the application descriptor. Populate the Web module: create the required Java ...
🌐
CodeGym
codegym.cc › java blog › java developer › creating the simplest web project in intellij idea enterp...
Creating the simplest web project in IntelliJ IDEA Enterprise. Step by step, with pictures
February 14, 2022 - The web folder also has an index.jsp file. Open it. This is the file that will be executed by default, so to speak. In other words, it is precisely what we'll see when we start the project. Basically, jsp is an ordinary HTML file, except you can execute Java code inside it.
🌐
JetBrains
jetbrains.com › help › idea › creating-and-running-your-first-java-application.html
Create your first Java application | IntelliJ IDEA Documentation
In this tutorial, you will learn how to create, run, and package a simple Java application that prints Hello World! to the system output. Along the way, you will get familiar with IntelliJ IDEA features for boosting your productivity as a developer: coding assistance and supplementary tools.
🌐
Stack Overflow
stackoverflow.com › questions › 61351561 › can-i-create-a-jee-web-app-with-intellij-community-edition
jakarta ee - Can I create a JEE Web App with Intellij Community Edition? - Stack Overflow
Java EE is only available "out of the box" with the Ultimate Edition (File > New > Project... > Java Enterprise > ...), but it is still possible to create Java EE applications using the Community Edition with some extra effort.
🌐
JetBrains
jetbrains.com › help › idea › creating-and-configuring-web-application-elements.html
Create Web application elements | IntelliJ IDEA Documentation
Press Ctrl+Alt+S to open settings and then select Editor | File and Code Templates. On the Files tab, click to create a new file template. Name the new template Servlet and specify Servlet as the file name. Make sure that the extension is java.
Find elsewhere
🌐
YouTube
youtube.com › watch
How to Create Java Web Project in IntelliJ IDEA - YouTube
Learn to develop a Java web application using IntelliJ IDEA, with Servlet, JSP on Apache Tomcat server. This video is perfect for those who are getting start...
Published   July 16, 2020
🌐
Medium
medium.com › @sams0ngultek › step-by-step-guide-on-how-to-set-up-the-environment-for-java-web-application-on-intellij-idea-ide-6f2cc588b12e
Step-by-Step Guide on How to set-up the environment for Java Web Application on Intellij Idea IDE Ultimate Edition + MySQL + Apache Tomcat. | by Samson Tekeste | Medium
March 23, 2024 - Download the community version which say “MySQL Community (GPL) Downloads »” you can find it in the last option. ... Downloading a java .jar file for establishing the connectivity between the database and Java program. Since we are using MySQL we are going to download the MySQL java connector that we can find in: ... Now let us open IntelliJ Idea IDE and create our first java web application.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 206935545-Can-we-develop-web-application-with-IntelliJ-IDEA-Community-Edition
Can we develop web application with IntelliJ IDEA Community Edition? – IDEs Support (IntelliJ Platform) | JetBrains
Please see the IntelliJ IDEA Editions Comparison page: http://www.jetbrains.com/idea/features/editions_comparison_matrix.html?IC ... Web Application support is an Ultimate feature, available in IntelliJ IDEA Ultimate only. It is still possible, however, to adopt the Community Edition for web development.
🌐
JavaPointers
javapointers.com › how-to › creating-web-application-using-maven-in-intellij
Creating Web Application using Maven in IntelliJ - JavaPointers
May 9, 2020 - This tutorial will help you on creating web application using maven in intellij. This assumes that you already have maven installed in your local machine
Top answer
1 of 2
20

Sure it's possible. I mean, it's possible to do web development in a text editor. The real question is what do you lose/how much of a pain it is. Some things that you will need to set up:

  • A task to build and deploy your WAR file locally(ant, maven, etc.)
  • To debug your project in IntelliJ CE, you'll need to spend some time setting up a run profile to launch your application server.

Even with that stuff set-up, you'll still be missing any convenience features specific to web development(beans won't automatically show links to relevant xml configurations, getters/setters used for dependency injection will probably show unused method warnings, etc.)

I'd say whether IntelliJ CE is a reasonable choice for web-development depends on how strongly you prefer IntelliJ to other editors, how comfortable you are with web-development in general(since you won't get any editor suggestions or warnings), and how complex the web components of your project are.

2 of 2
5

EDIT: This answer is now outdated. There is a war plugin in gradle that can be used directly by IntelliJ. Original contents follow, but please don't do this anymore.

We were using this gradle file:

apply from: 'https://raw.githubusercontent.com/icoloma/gradle-plugins/master/webapp.gradle'

group = 'com.mycompany'
version = '1.0-SNAPSHOT'

repositories {
    mavenCentral()
}

dependencies {
    providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.0.1'
}

Then execute gradle idea or gradle eclipse to generate a project that can be deployed in IntelliJ Community Edition.

The long explanation is available here and the source code is available as a Github project.

🌐
Microsoft Learn
learn.microsoft.com › en-us › azure › developer › java › toolkit-for-intellij › create-hello-world-web-app
Create a Hello World web app for Azure App Service using IntelliJ - Java on Azure | Microsoft Learn
In the Deploy to Azure dialog box, you can deploy the application to an existing Tomcat webapp or you can create a new one. a. Click + to create a new webapp. Otherwise, choose WebApp from the WebApp dropdown if there are existing webapps in ...
🌐
ISA-Ali
alias-i.com › home › building & launching java web apps in intellij
Creating a Maven Java Web Application in Intellij
August 21, 2023 - Dive into the world of seamless development! Learn step-by-step tips for creating and running a Maven Java web app in IntelliJ with ease.
🌐
Quora
quora.com › Can-I-do-web-development-backend-with-Java-using-IntelliJ-IDEA-Community-Edition-Do-I-need-the-Ultimate-version-to-be-able-to-do-it
Can I do web development (backend with Java) using IntelliJ IDEA Community Edition? Do I need the Ultimate version to be able to do it? - Quora
Answer (1 of 2): You wouldn’t know it looking at the comparison page at jetbrains. After all, who’d think you could do any web-work with the community edition - the framework support is not there (!): However, this is not entirely accurate, because even the community edition supports the ...
🌐
Dev.java
dev.java › learn › intellij-idea
Building a Java application in IntelliJ IDEA - Dev.java
In this tutorial you’ll learn how to use some of its features to simplify your development process and accelerate your learning curve with Java programming. To install IntelliJ IDEA, download the version you want to use from the IntelliJ IDEA website and follow the instructions. Note that IntelliJ IDEA is available in two editions: IntelliJ IDEA Community Edition - free and open-source.
🌐
JetBrains
jetbrains.com › help › idea › preparing-to-develop-a-web-service.html
Enable web service development | IntelliJ IDEA Documentation
Click the Add button again, then select JARs or Directories... from the context menu. In the dialog that opens, select the javaee.jar library and the required web service-specific libraries.
🌐
JetBrains
jetbrains.com › help › idea › deploying-a-web-app-into-an-app-server-container.html
Deploy a Java web application inside an application server container | IntelliJ IDEA Documentation
IntelliJ IDEA generates a default project with a Java web application that has the index.jsp home page and the HelloServlet.java class that responds to requests at /hello-servlet.