Configure tomcat intelliJ

Last tutorial we saw how to create Maven web application project in IntelliJ. Here we will run Maven Web Application on Tomcat server. First we will have to configure tomcat server into IntelliJ. Please follow the step below:

1. Download Tomcat from here: https://tomcat.apache.org/download-90.cgi and you will have to choose latest version as I have choose latest version of Tocmat 9.0.31

Configure Tomcat Server IntelliJ

2 . Now go to your MavenWebApp project and click on –>Add Configuration –> Then click + sign to configure new Tomcat Server (Note: You need to have IntelliJ Ultimate version) Otherwise Tomcat server won’t show up in community version

Configure Tomcat Server IntelliJ

3. Once you click OK button on previous screen you will see below, here you will have to choose server and in our case its Tomcat Sever (If you are using IntelliJ Ultimate then you will see two Tomcat sever on is Enterprise version) please choose one which is not Enterprise –> then select configuration to Local:

Configure Tomcat Server IntelliJ

4. On below screeen we need to configure Tomcat server. So first thing you need to do is to choose wherever you have installed Tomcat and provide its home location you will something like below:

Project 2

5. Now on Deployment tab you need to add Artifact as we already created MavenWebApp so it will show you option:

configure-tomcat-server-intellij

6. Choose below which is from project MavenWebApp:

Project config 1

7. You will see below:

Project config 1

8. In below screen finally you will see Application server, URI of the application which you can use to run and by default it will show you HTTP Port which is 8080 and JMX port 1099. If you can change but for now lets keep it unchanged then click App;y button:

Project config 1

9. We are all set now lets start the application:

Project config 1

10. You will see application is started and tomcat redirect to default browser and you will see Hello World!!!

Project config 1

11. That’s it. For more information please visit IntelliJ

Leave a Reply

Your email address will not be published. Required fields are marked *