IntelliJ and Tomcat…changed files are not automatically recognized by Tomcat

前端 未结 6 1499
攒了一身酷
攒了一身酷 2020-11-28 01:03

I am running Intellij Ultimate with Tomcat and deploy a war. Everything deploys fine to the webapp directory of tomcat.

When I change a file like an xhtml file, i

6条回答
  •  眼角桃花
    2020-11-28 01:31

    That is possible only when you deploy the exploded war folder, enabled hot reloading and start tomcat in debug mode.

    These are the steps to achieve this.

    1. open your Tomcat Run/Debug configuration (Run > Edit Configurations)
    2. Go to the "Deployment" tab 3.In the "Deploy at Server Startup" section, remove (if present) the artifact my-webapp-name:war
    3. Click the add icon, select 'artifact' and then select my-webapp-name:war exploded
    4. Click OK (on the "Select Artifacts to Deploy" dialog)
    5. Still in the Run/Debug Configuration Window, select the "Server" tab
    6. Change the "On frame Deactivation" and "On Update Action" settings to either "Update classes and resources"
    7. Apply and save
    8. Go to the normal projects settings by clicking File then Settings OR Pressing CTRL + ALT + S
    9. goto "Build, Execution, Deployment"
    10. Compiler
    11. Select Build project automatically
    12. save
    13. Start tomcat in debug mode

提交回复
热议问题