I ' m trying to make a simple web App in IntelliJ by following this tutorial:http://wiki.jetbrains.net/intellij/creating_a_s Imple_web_application_for_tomcat_in_intellij_idea_12 I believe my tomcat is installed correctly since I, the Tomcat pictures when I go to http://localhost:8080/ I ' ve followed all the "steps up until" 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.UnknownHostExcept Ion:nodename nor servname provided, or not known I'll be in the log: Application server is not connected before run configuration stop, reason:unable to ping Server at localhost:1099 The answer is as follows:
/etc/hosts file to point to localhost (127.0.0.1). If you are a Mac user, you can enter hostname in the terminal to obtain hostname $ hostname
Macbook-pro From the output above your know your hostname is "Macbook-pro". Edit '/etc/hosts ' file and add ' name at the ' End of line ' that lists 127.0.0.1 Now that you know the hostname, replace the following macbook-pro for your hostname, and then add the following paragraph to the end of the host file 127.0.0.1 localhost Macbook-pro
This method solves the problem in the Mac version perfectly. |