热重新发布/部署静态xhtml文件问题 [英] Hot republishing/deploying of static xhtml files issues

查看:137
本文介绍了热重新发布/部署静态xhtml文件问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到在以下环境中操作JSF页面的热部署的很多问题:

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


  1. Eclipse Indigo最新版本)

  2. Tomcat 5.5

  3. JSF 1.2

  4. Facelets查看处理程序

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

我注意到,如果我修改已经渲染的xhtml页面(例如元素的CSS样式),然后重新发布(通过Eclipse或手动复制xhtml文件在Tomcat中)此页面(维护servlet容器),它不显示当前的更改。

I noticed 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">

我最后一个想到的是,典型的JSF页面的还原 - 查看阶段处理,不检查是否客户端视图(当然是xhtml页面)从FacesContext的最后一次更改。

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.

如果是,我如何强制建立对于每个提交的请求,一个新的UIViewRoot对象?

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

对于jsf页面中的每个更改重新启动tomcat服务器,我感到很沮丧。

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

非常感谢您的支持。

推荐答案

尝试将以下内容添加到您的web.xml配置文件:

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>

它告诉JSF重新渲染Facelet。看我怎么把1。在Prod环境中,您始终将-1禁用此功能,因为在Prod环境中,面孔不应该更改。

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.

您还需要制作确保您可以使用Hot Deploy类和JSP资源。你可以在这里找到如何做:

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/

这篇关于热重新发布/部署静态xhtml文件问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆