IntelliJ hot swapping classes, but not JSF pages
Asked Answered
S

3

1

First of all, I would like to say that there is plenty of pages on StackOverflow and I tried all I found related, but I am doing something wrong.

I have IntelliJ server set up to:

  • server Tomcat 8
  • JDK 8u65
  • Maven
  • IntelliJ 14
  • In Run/Debug configuration I have set
    • VM Options:
      • On Update action: Update resources
      • On frame deactivation: Update classes and resources
  • Before launch: Build xxx.war exploded
  • Deployment tab set to deploy xxx.war exploded

If I change the body of any class (e.g.returned value), everything is fine and it hot swap the class as I would expect.

Unfortunatelly when I change some JSF resources(under webapp directory), nothing happens. I looked into Tomcat temp directory, where files are moved into, and I can see only the old ones.

I also tried to add webapp directory as resources in IntelliJ, and it did not help.

Where do I have mistake?

My project structure:

    src
    └── main
        ├── java
        |    └── *.java
        ├── resources
        |    └── spring-web-context.xml    
        └── webapp
             ├── template.xhtml
             ├── ...
             └── index.xhtml
Sharell answered 24/10, 2015 at 10:5 Comment(0)
S
3

I decided to do fresh instalation of IntelliJ and take some JSF sample project.

I found out that the settings described is working, so there is something wrong either with my working project, or instalation of IntelliJ

Sharell answered 31/10, 2015 at 10:19 Comment(0)
F
0

In order hot-swap of resources to work, the exploded artifact must be named with resp. extension ("war", "ear").

For example if your artifact is called ROOT.war, the exploded artifact must also be called ROOT.war, although while the first one is actually a zip, the second one is a folder.

This works on my JBoss server.

Furan answered 26/10, 2015 at 11:39 Comment(1)
I tried to rename the artifact to web.war and unfortunatelly it did not help. Can you please add some printscreen, so I can see If i did it right?Repurchase
S
0

I had the same problem and eventually found that javax.faces.FACELETS_REFRESH_PERIOD was set to -1. As described in this post, changing it to 0 worked.

Solenne answered 30/11, 2018 at 7:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.