This is for Mac, linux is similar.
- First go to apache tomcat website. Download zip from
Corepart(tar.gz is fine too).
~/Downloads, unzip the file into a folder.
- Move the extracted folder
mv ~/Downloads/apache-tomcat-8.5.20 ~/Applications/apache-tomcat-8.5.20
sudo ln -s apache-tomcat-8.5.20 tomcat
- First go to apache tomcat website. Remember to download the windows version zip files.
~/Downloads, unzip the file into a folder. Remember the folder path.
- Add the tomcat path to the confiuration. When you work on 3.1. Other parts are the same.
Download Spring MVC example code. Unzip the code to a folder and use IntelliJ to open the code folder.
Edit Configuration in the picture below.
If you have installed the
Tomcat, your configuration should be the same as below. Ohterwise you should install
Tomcat firstly. And if you have installed
Tomcat, you need to choose the
Tomcat path. And then run. In my computer, I use
/Users/lich/Applications/tomcat for the
After you run your program, you can see the following. It meens Spring MVC has been installed in your machine.
When you run the project, it says you don’t have permission. You can try the following commands.
The easiest way to do is to just chmod all the folder into 777 permissions.
Otherwise, it’s safe to set a new user nobody to run
You can check this post to see how to do.