IDEA 11 and starting Tomcat - Here's how I got it working

Here is a tip that might save you some grief:  In IDEA 11, using Tomcat, if your run config doesn't seem to start Tomcat, be sure the new checkbox entitled Deploy applications configured in Tomcat instance is checked.  This is new to IDEA 11 and its name seems to me rather misleading, as it doesn't seem to be about deploying but rather starting up Tomcat.  Since we don't have any "artifacts" for our run config, we let an ant script "deploy" our application, so I didn't think I would need to check this checkbox.  The truth is, if you don't check it, IDEA will never start Tomcat.

3 comments
Comment actions Permalink

Firstly, this checkbox is not a new feature of IDEA 11, it was available in IDEA 10. However this option didn't work properly for some versions of
Tomcat and this bug indeed was fixed in IDEA 11.
Secondly, this option isn't required to start the Tomcat. When you press 'Run' button for a Tomcat run configuration IDEA calls 'catalina.bat run'
command to start the Tomcat regardless of this option. However if this option isn't checked IDEA will deploy to Tomcat only web applications specified
in 'Deployment' tab of the run configuration and won't deploy applications from 'webapps' directory of the Tomcat installation.

--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Thanks for explaining that.   However, IDEA 11 did NOT start Tomcat unless that button was checked.   I verified this by observing that the war file (unexploded) was sitting in the Tomcat webapps directory and never got expanded.  Starting Tomcat via the command line worked fine.

0
Comment actions Permalink

Looks like it is just a matter of the terminology. 'Server is started' means that the server process is running and it's able to process requests.
'Application is deployed' means that the application is loaded by the server. The war file is unpacked when the corresponding application is deployed.

--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.