views:

20

answers:

1

Using IDEA and tomcat I setup a simple spring mvc app (thanks to you guys) and it was deploying using a 'web app exploded' format.

Is a .war file the same thing, except in a single file appname.war?

How can I configure IDEA to do this?

  1. how do I have IDEA make a .war file during compilation and/or deployment?
  2. how do I link this to tomcat?

  3. when tomcat runs, how does it point to my output and where does it configure my app to run?

+2  A: 

It depends on the IntelliJ IDEA version you are using. Usually in the same screen where you setup the exploded directory, you can setup to generate a WAR file too - just need select that checkbox.

With IntelliJ IDEA 9.x however, a new configuration was introduced called "Artefacts" - it is much more flexibile, but for me it was not as intuitive as the old solution.

Here is a small article about this "Artefact" new feature, but you can read more about it directly from the IntelliJ online help.

If you want to control tomcat form inside IntelliJ (e.g. practical when developing), than you need to add in the project configuration a new Facet - the Tomcat Facet. That way you can specify in that screen the deployment mode.

A. Ionescu