I am learning Spring MVC and trying to connect IntelliJ IDEA to Tomcat Server. So far I have downloaded the Tomcat 10 tar.gz package from the Tomcat website, extracted and put it at the following location: /Users/roxhens/Tomcat10.
Then, I create a new Spring MVC project and go to:
Add Configuration... > Click + > Tomcat Server > Local and then click Configure and provide the path above.
When I click OK, the following error in the picture shows up: Cannot Save Settings. Where can I find these Application server libraries?
4 Answers
IntelliJ IDEA 2019.3.x doesn't support Tomcat 10 yet.
Use the supported Tomcat version (9).
1If you are on Windows and you installed Tomcat on the primary hard drive of your System, you need to run IntelliJ IDEA as Administrator to be able to add the Tomcat server.
I had this with Apache Tomcat/9.0.76, IntelliJ IDEA 2023.1.2. I'd first seen "Selected directory is not a valid Tomcat home" and had done:
cd /opt/tomcat # or wherever it's installed sudo find . -type d -exec chmod o+rx {} + # Tomcat dirs available to all users. to make the Tomcat directories usable by all users. I then got "server libraries not found" and fixed it with:
sudo find . -type f -exec chmod o+r {} + # Tomcat files readable by all You can keep users from seeing the logs with:
sudo chmod -R o-rx logs/ you have to point it to $Path/tomcat@9/9.0.45/libexec
