I'm trying to make a simple web app in IntelliJ by following this tutorial:http://wiki.jetbrains.net/intellij/Creating_a_simple_Web_application_for_Tomcat_in_IntelliJ_IDEA_12
I am using a MAC. Steps I took:
1. Install Tomcat using Homebrew
brew install tomcat
This created /usr/local/Cellar/tomcat/7.0.42
2. Configure application server
In IntelliJ's settings -> application server, I created a Tomcat 7.0 entry with home and base directory /usr/local/Cellar/tomcat/7.0.42/libexec (that's where the /conf directory was)
3. I continue the tutorial until the part it tells me to run
index.jsp, at which point I get the error:
Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: nodename nor servname provided, or not known
Application Server was not connected before run configuration stop, reason: Unable to ping server at localhost:1099
This 1099 comes from the JMX port in Run -> Edit Configurations
I have tried setting this value to other values but it gives me the same error.
How do I fix this?In case this is relevant, localhost:8080 does not work for me when I try to run in IntelliJ (I believe because of the error, it doesn't get to startup Tomcat). However, if I run startup.sh from tomcat's directory (/usr/local/Cellar/tomcat/7.0.42/libexec/bin/startup.sh, I see the tomcat picture.