0

I have a project with different modules. In fact, I have 4 modules:

  • presentation-jsf
  • repository-oracle
  • service
  • webapp

See the image below:

enter image description here

I am developing a library to use by another teams of the company I am working at. For that reason, we can not add the xhtml files in the webapp module. We decide that because as a library we want to keep in that way. We are using Primefaces 6.1 with the Barcelona theme. Also, I am using JSF2 with Tomcat.

The WebApp is totally empty because are the clients who will be using it in theirs webapps. For that reason, the module where I have the .xhtml files is presentation-jsf. Inside there, I have all the xhtml files:

enter image description here

The problem is that when I am executing the webapp itself, without any client, the application is working fine (I can access to the http://localhost/web/app/view.xhtml file). I don't need any of my client's project to use the library. I can use it directly as a webapp. But the main problem is that I can not do a hot redeploy. It means that all the files with xhtml format, is not working.

Of course, when I am using any of my clients, the application is not doing any hot redeploy because they are using it as a war file (library). For that reason, I suppouse that is not possible to do a hot deploy.

I am using Intellij. For that reason, maybe there is some way to copy the file in a hot. If I have to do any change, I have to do a restart of the server and sometimes, I have to do a maven clean install to clean it up.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
ferran87
  • 635
  • 1
  • 6
  • 17
  • Only exploded war will work for hot deployment, see https://www.jetbrains.com/help/idea/2017.1/updating-applications-on-application-servers.html. – CrazyCoder Jul 14 '17 at 11:48
  • Indeed. Not sure about IntelliJ but Eclipse does that automatically when the referenced fragment project is in same workspace. This is by the way not strictly a JSF problem, just a tooling problem. You would have faced exactly the same problem when using any other web framework in this setup like Spring MVC, Struts, plain JSP/Servlet, etc, hence I removed the misleading [jsf] tags from the question. – BalusC Jul 14 '17 at 12:08
  • @CrazyCoder yes, I have the war exploded. – ferran87 Jul 17 '17 at 06:51
  • @BalusC probably it's the IDE problem, but I don't know how to configure IntelliJ to deploy in hot redeploy. Can you tell me some tips about it? – ferran87 Jul 17 '17 at 06:53
  • As said, I'm not sure. I don't use it. – BalusC Jul 17 '17 at 07:10
  • Finally I saw that the files are hot swapped in a good way. On the other hand, I can see the files are changed, but it is not the case on seeing the results on the webpage. There is a cache by default on Primefaces or JSF2 to avoid reload the JAR files when are changed? – ferran87 Jul 27 '17 at 09:10

0 Answers0