Using Intellij to Build War and Deploy to Tomcat

Checklist of things you can do to verify where things go wrong:

  1. Manually build the artifacts using Build > Build artifacts.
  2. Verify if the artifact is in the expected output directory (out/artifacts/xxx).
  3. If not, go to File > Project structure > Artifacts
  4. Select the artifact file in question (project_name in this case).
  5. Verify if the output directory is correct. Optionally try to create this directory yourselves in case IntelliJ doesn’t do it (although this would surprise me)
  6. Verify if the contents are correct.
  7. Optionally check “Build on make” to always have the latest version of your code deployed whenever you run the server.

Note that for deploying WAR files to a Tomcat, you should prefer to use the exploded WAR. This makes deploying/testing/debugging significantly faster.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)