开发者

Hot republishing/deploying of static xhtml files issues

开发者 https://www.devze.com 2023-04-07 16:41 出处:网络
I\'m noticing a lot of issues operating the \"hot deploying\" of JSF pages in the followingenvironment:

I'm noticing a lot of issues operating the "hot deploying" of JSF pages in the following environment:

  1. Eclipse Indigo(latest version)
  2. Tomcat 5.5
  3. JSF 1.2
  4. Facelets View Handler

I not开发者_StackOverflowiced that, if I modify an already rendered xhtml page (for example the CSS style of an element) and then re-publish(through Eclipse or manually copying the xhtml file inside Tomcat) this page (maintaining the servlet container up), it doesn't show me the current changes.

I also, in vain, setup the following configuration on my web application:

<Context 
    docBase="mywebapp" 
    path="/mywebapp" 
    reloadable="true" 
    cachingAllowed="false">

My last tought is that the Restore-View Phase of a typical JSF page processing, does not check if the client-view (the xhtml page of course) has changed from the last time it has been loaded in the FacesContext.

If so, how can i force the building of a new UIViewRoot object for each submitted request??

I'm a lot frustrating in restarting the tomcat server for each change in jsf pages.

Thanks a lot for your support.


Try adding the following to your web.xml config file:

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

It tells JSF to re-render the Facelet. See how I put "1". In a Prod environment you would always put "-1" to disable this feature, since the facelets shouldn't be changing in a Prod environment.

You also need to make sure you can Hot Deploy class and JSP resources. You can find how to do that here:

http://ducquoc.wordpress.com/2010/11/06/eclipse-wtp-tomcat-hot-deploy/

0

精彩评论

暂无评论...
验证码 换一张
取 消