Setup Tomcat and Maven in Intellij - Java EE

in #programming5 years ago (edited)

Setup Tomcat and Maven in Intellij

For those who wants to useIntelliJ IDE for Jave EE Web Development programming instead of Eclipse. If you are following this tutorial in Udemy https://github.com/in28minutes/JavaWebApplicationStepByStep you might find it using Eclipse. This tutorial is what we are going to reference with for this blog. We will shift it from Eclipse to IntelliJ.

As before I will keep this blog as simple as possible.

Let's start!

1.) Open IntelliJ, close any project you are working for now. You will see this new project window.
1.JPG
2.) Click on "Configure" with the gear icon below and then click "plugins".
2.JPG
3.) In the Installed tab, make sure that Maven Integration is checked.
3.JPG
4.) In the Marketplace tab search for Smart Tomcat and install it.
4.JPG
5.) Press ok and then create a new project. In the new project window select Maven. Click Next.
5.JPG
6.) Type in the GroupID and ArtifactID you wanted. Click Next and name the project. You can leave the project directory as is. Click Next.
7.) It will now create the project. A pop-up message will show telling you to import Maven Projects. Select Auto-Import.
8.JPG
8.) Copy the codes on this github page https://github.com/in28minutes/JavaWebApplicationStepByStep/blob/master/Step01.md . Ofcourse create first the files and the directories.
12.JPG
9.) Once done. Re-import Maven. Click on Maven on right corner. Click the recycle like icon. You can refer to the image above.
10.) Now let's configure run. Click on Run on the menus and click Run. A small box will show click on Edit configurations.
11.) A new window will appear. Click on the plus sign on the top corner and then select Smart Tomcat.
14.JPG
12.) Name the server and then click apply.
13.) Click on the plus sign again and then select Maven. Type "tomcat7:run" on the command line and press apply. You can now close this window.
14.) On the right corner you will now see this (refer in the below picture). Select on the drop down menu the maven run configuration we created. Click on the Run button near it. Wait till things work its magic and your server should now be running :)
20.JPG

Congratulations!

Now go to localhost:8080 and you should see something like the picture below. This shows that the server is running.

19.JPG

if you changed values in the code, stop and re-run the server. And of course reload the browser :)


ranman-psd 100x100.gif
This will, unlike said in the tooltip, will send you to my profile on steemit

Please upsteem and resteem :)

Follow me here https://steemit.com/@ranman09

Sort:  

Congratulations @ranman09! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You got a First Vote
You made more than 10 upvotes. Your next target is to reach 50 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

The Steem blockchain survived its first virus plague!
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Hello ranman09, welcome to Partiko, an amazing community for crypto lovers! Here, you will find cool people to connect with, and interesting articles to read!

You can also earn Partiko Points by engaging with people and bringing new people in. And you can convert them into crypto! How cool is that!

Hopefully you will have a lot of fun using Partiko! And never hesitate to reach out to me when you have questions!

Cheers,
crypto.talk
Creator of Partiko

Thank you!

Posted using Partiko Android

Coin Marketplace

STEEM 0.27
TRX 0.13
JST 0.031
BTC 61665.59
ETH 2884.57
USDT 1.00
SBD 3.62