0 Replies Latest reply on Oct 25, 2007 11:03 AM by dsleeper

    Problems with exploded deployment and cache

    dsleeper Newbie

      I've been working with JSF for nearly three years now and still after these years there is one problem that bothers me everyday! The problem is related to working with an exploded web application deployment. When editing a jsp/xhtml file you want to see the changes done to it without having to restart you webapp server.

      My usual way of forcing the faces/facelets servlet to recompile/re render the changed content has been to:
      1. Force browser refresh by ctrl-f5
      2. Force browser refresh by loading a different page and then going back to the page that changed
      3. Hitting refresh several times
      4. Clear browser cache
      5. Load page in a different browser

      When none of the above work the only way to make the changes appear is to stop Tomcat and restart. After upgrading to the latest version of myfaces/richfaces/facelets I cannot get any of the "regular" force refresh solutions to work, and I'm stuck developing the view parts of my application by stopping and starting tomcat all the time.

      This is VERY time consuming and not a very good way to work at all! I've been searching a bit for documentation on the matter, but I cannot seem to find much of it..

      I am using MyEclipse for the exploded deployment part of this, and I can physically see that the XHTML pages have been updated with the changes I do under tomcat. However they never get recompiled it seems.

      1. Is this a common problem for the regular JSF developer?

      2. Are there good ways of circumventing this problem? Is there a way to make facelets/faces servlet always recompile the view?

      3. May this problem be related to a specific web application/tomcat version?

      My enviroment:
      Tomcat 5.5.20
      Myfaces 1.1.5 / Tomahawk 1.1.6
      Richfaces 3.1.1-GA
      Facelets 1.1.13

      web.xml settings that I think may impact my problem:

       <display-name>RichFaces Filter</display-name>

      Typical subview page:
      <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
       <ui:composition template="/templates/myTemplate.xhtml">
       <ui:define name="body">
       my content

      On a related note:
      Why do the facelets servlet decide to render out the jsp:root element when rendering the page? I thought it should not render anything outside the ui:composition tag.