Apache Tomcat Integration in IntelliJ IDEA and War file Deployment

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone welcome in this tutorial session in this tutorial session we are going to integrate apache tomcat in intellij idea then we will see how to deploy a war file and how to run the web application so guys as you can see in front of you these are the steps and we will follow these steps one by one let's get started with the step one in the step one we need one plugin so we are going to install a smart tomcat plugin intellij idea first so this is the intellig idea and this is the project which we have which we have been set up in our previous tutorial and now here in this first we will go for the plug installation go to the right hand side here you will see the gear i can click on this and this pop-up window will appear so guys select the plugins and then plugins window will appear so on the left hand side click on the plugins and here select the marketplace and type smart tomcat at this place so you will see some search results select smart tomcat so you will see the smart tomcat here and here's the installation button please click on it and this will not take much time this is quickly installed okay guys now click on this ok button to proceed okay so plugins is installed now we will move to the next step we will integrate the apache tomcat package inside the intellij idea so guys first you have to download the apache tomcat version if you have already downloaded the apache tomcat package so you can proceed go here click on this add configuration here in this window you have to click at here on this plus sign once you click you will see a dropped list and here you will find that your tomcat smart tomcat option click on it and then a new window will appear on the right hand side so this is the first field so you have to give the name of the tomcat suppose you want to integrate different version after tomcat so you can add this way so i am going to set up tomcat9 okay so i have given the name now click on this place and this window will appear so here we are going to add the tomcat server click on this plus button then the drop list will appear so this is the place so you have to browse the location of your the download apache tomcat package you can see i have already downloaded and my folder is at this place and i will simply select the parent folder of the tomcat simply select and click ok and you will see these fields are populated like tomcat name tomcat version and tomcat location that's it click on this ok button once you click ok you will be back on the previous screen and now you will see a few more fields blank click add displays and here this will open you click on this src once you see the childs of this node and click on this web app okay that's it and now click here ok once you click ok you will see the context path is auto populated and you will see the server port admin port is appearing so if you want to change the server port from 8080 you can give appropriate value for this but i would suggest please start this without changing the port number okay leave rest of the two fields as it is click on this apply button then click ok it's done now it's time to run the apache tomcat so this is our third step we are going to follow it i'm going back here in the intellij idea and go here and click on this run button once you click on it you will see some activities is going on here on this terminal and you will see some messages start printing on this terminal very soon we will find our tomcat running you can see activision activity is going on and finally we got the message catalina dot start server startup in two three nine three milliseconds that means your servers is up now okay it's time to test the tomcat if you want to stop your server click back here on this red square box to stop the tomcat server it's easy here in the intellij idea so guys now we are moving to the step four we want to run our web project in tomcat from the intellij idea so process is very simple again we have to go back here select your project and start the tomcat once the server is started you have to open the chrome browser and then you have to type localhost colon 8080 forward slash my project and hit enter in you will see the return string which is coming from here at index.jsp so once you hit the root you will be get a message from the index.html which is the welcome.jsp page for your web application now i will close the server okay guys now we will see how to deploy a war file in tomcat from the intellij idea to do that we have to follow few steps let me tell you one thing we cannot directly deploy the war file from here to the tomcat directly because this is the community version so this is the limitation of this community person you have to follow a simple different approach so first we need to compile our project so do the right click here on this maven tab and select the compile from this life cycle elements and once the project is compiled you will see build success then go for here the packaging select this package do a double click and you will see the activities starting and the packaging process is still going on and very soon we will see the package is ready and the ones one target folder is appeared here in this project tree and once you expand it you will find your war file now it's time to deploy a war file we have to follow a basic manual approach to deploy this war file in a tomcat so first we need to copy this war file from this place now open the location of the application server where your apache tomcat package is staying so just look for a web apps folder at this place we have to deploy our war file so guys do a right click here on this war file copy and go here at this web apps location paste your war file here that's it now go back here in the intelligent idea and just simply run your tomcat from this place click on this button so guys our tomcat server is startup now we can see our web application is working or not go to the browser again and just type localhost colony8080 and the root package root for project name and hit enter and you must see this text which is coming from the index.jsp let me show you so guys you have seen your web application is running and your server is up this is all about the process of integrating apache tomcat inside intellij idea and deploying a wall file inside tomcat if you guys found this tutorial relevant and useful please hit the like button and don't forget to subscribe my channel and guys bye for now
Info
Channel: Cool IT Help
Views: 12,517
Rating: undefined out of 5
Keywords: Configure Apache tomcat server on IntelliJ IDEA community edition, Setup tomcat on your computer., Tomcat in Intellij Idea Community Edition, Headless Setup of a Java Project with Tomcat, how to use smart tomcat in intellij community edition, add tomcat server to intellij, intellij community edition tomcat gradle, tomcat plugin for intellij, intellij community edition tomcat debug, jboss integration plugin intellij, application server libraries not found intellij tomcat
Id: JIRDMGJ66SE
Channel Id: undefined
Length: 9min 3sec (543 seconds)
Published: Mon Jun 07 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.