1

I'm using IBM RAD version 8.0 and deploying the EAR applications to IBM WebSphere 7.0. Each time I change a JSF file, I need to republish the application, otherwise the changes are not visible.

Publishing takes some time, so usually it takes minimum a minute before I'm able to see the efects of even the most minor change. In 'normal' application development it's about a few seconds, and it's crucial for someone who is no JSF coryphee and still learns and needs to experiment...

Is it possible to use the JSF ability to re-load the JSF page definition without application restarting, when working with IBM RAD and WebSphere? Or I'll be forced to create second environment with Eclipse & Tomcat, for JSF experiments only?

Danubian Sailor
  • 1
  • 38
  • 145
  • 223
  • With JBoss 6 & 7 with Eclipse, changes to .xhtml files are immediate, but changes to classes (managed or unmanaged) need the application to restart. HTH – SJuan76 Jan 11 '13 at 15:00

2 Answers2

4

This is normally to be configured in server configuration. Doubleclick the desired server in Eclipse's Servers view and head to Publishing section.

enter image description here


Note that you should take Facelet cache into account as well, particularly when using MyFaces which caches relatively agressively. If you make sure that javax.faces.PROJECT_STAGE context parameter is set to Development, then both MyFaces and Mojarra will relax the Facelet caching strategy, causing it to recompile the Facelet file almost instantly instead of using the cached version for a rather long time.

An alternative to Publishing setting is to use JRebel. It is able to publish changes in Java classes such as managed beans and EJBs as well, saving a lot of hotdeployment time. It has an Eclipse plugin as well.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • I'm using the Development stage. The changes are not visible anyway (maybe WebSphere specific). But thanks to you, I'm at least able to decide when I publish :) Using specific plugins is not the case because I'm condemned to that RAD, and in the configuration managed by security etc :( – Danubian Sailor Jan 11 '13 at 15:28
  • The "publishing" process is merely the step of copying changed files from IDE's project folder to server's deploy folder. The server should in turn be configured to automatically hotdeploy on changes in the deploy folder. I don't do Websphere (since years), but Tomcat has a `` setting for this (which is autotriggered by Eclipse as well when using the proper (builtin) Tomcat plugin). You might want to look in Websphere documentation or ask the server admin for clues similar to this. – BalusC Jan 11 '13 at 15:54
  • My team faced this issue at varied stage, first check as suggested by BaluC is javax.faces.PROJECT_STAGE = Development. And if it still does not work (for us it did not), we got this resolved by a. Upgrading to RAD V8.0.4, b. few uninstalled and reinstalled RAD c. few moved to Windows 7 (earlier version was Windows 2008 Server), and then installed RAD. At the end Windows 7 and RAD V8.0.4 combination worked for all, and we no longer facing this issue. – ad-inf Jan 12 '13 at 12:22
2

This thread is old, but I still had the same problem, using eclipse and WebSphere.

One place to check is this. If you use JSF files with the .xhtml ending, you have to make sure that changes in these do not trigger automatic republishing.

  1. In the tab "Servers" double-click on your server.
  2. Open the "Publishing settings for WebSphere Application Server"
  3. Click on "Set Advanced Publishing Settings...".
  4. In the "List of file extensions that do not trigger the server to publish ..." insert or append ", *.xhtml".
  5. Close these settings and restart the server.

In web.xml I have also added a parameter with the name javax.faces.PROJECT_STAGE and the value Development , which may have an influence on the offending behavior.

hgmichna
  • 21
  • 1