Question

I am using Jboss 7.1.1 AS to deploy my JSF based Web app. I am using Filesync plugin to Hot swap the code. It's working perfectly fine for .java or any other filechanges. But Jboss as not picking up the changes when I modify something in the .xhtml pages.

I tried by adding

 <context-param>
    <param-name>facelets.REFRESH_PERIOD</param-name>
    <param-value>1</param-value>
  </context-param>

  <context-param>
    <param-name>facelets.SKIP_COMMENTS</param-name>
    <param-value>true</param-value>
  </context-param>

to web.xml. But it's not working either and I don't see my changes in browser when I refresh the page. It worked with tomcat when I used same configuration. Do I need to do any special configuration for Jboss in order to make this work?

Était-ce utile?

La solution 3

I am able to find the Issue with my Hot Deployment to Jboss server. It's not the Server Issue. But , it is the fact that I am using Jboss Maven Plugin to deploy my application to Jboss , Hot deployment is not working. But if do regular deployment like

Application--->Run on Server

my hot deployment is workng fine. Not sure what's issue caused by Maven plugin

Autres conseils

Check if your configuration of file synchronization is configured to include .xhtml files.

Take a look at this article.

Troubleshooting

...

Problem: files in the resources directories aren't synced

Solution: for some reason, sometimes Eclipse wants to exclude all files in the resources directories by default. Check this in the build path of your project settings.

Other thing to check is, if .xhtml file has changed timestamp in target directory after it has been modified.

  • If timestamp is changed after modification, than filesync is doing its job, but jboss is not reloading files.

  • If timestamp is not changed, then filesync is not updating target
    dir. In this case configuration of filesync is the place to search
    for problem.

I think the keyword here is cache.

I'm not using Jboss AS or hotdeploy, but I faced the same problem with JRebel + Thymeleaf (template plugin).

The root of my problem was Thymeleaf's cache. Where were an option for caching templates in Thymeleaf and JRebel didn't know how to work with it.

So you need to find how JBoss AS caching this pages and to turn off this cache.

One of possible cases was described in this answer.

put this in your web.xml

<context-param> <param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name> <param-value>1</param-value> </context-param>

I used to have this problem and it was useful for me

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top