Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Caching JBoss没有';t在xhtml文件更改时使其jsf页面缓存无效_Caching_Jsf 2_Jboss6.x - Fatal编程技术网

Caching JBoss没有';t在xhtml文件更改时使其jsf页面缓存无效

Caching JBoss没有';t在xhtml文件更改时使其jsf页面缓存无效,caching,jsf-2,jboss6.x,Caching,Jsf 2,Jboss6.x,当我更改xhtml文件时,JBossJSF页面缓存似乎并不总是更新。例如: 模板 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.prime.com.tr/ui" xmlns:f="http://java.sun.com

当我更改xhtml文件时,JBossJSF页面缓存似乎并不总是更新。例如:

模板

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:p="http://primefaces.prime.com.tr/ui"
  xmlns:f="http://java.sun.com/jsf/core">
<f:view contentType="text/html">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta http-equiv="pragma" content="no-cache"/>
        <meta http-equiv="cache-control" content="no-cache"/>
        <meta http-equiv="cache-control" content="must-revalidate"/>
        <meta http-equiv="expires" content="-1"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    </h:head>
    <h:body>
        <ui:insert name="body"/>
    </h:body>
</f:view>
</html>

MyPage.xhtml

<ui:composition template="template.xhtml">
    <ui:define name="body">      
        <h:outputText value="Some text"/>
    </ui:define>
</ui:composition>


如果我现在加载MyPage.jsf,它将显示“一些文本”。现在,我将分解包中的“some text”更改为“changed text”,并重新加载页面。页面将显示新文本。但是,如果我再次更改它,它仍将显示旧值。这个问题似乎来了又去,但当它出现时,它适用于我的所有页面。每个页面只反映一次更改,然后它似乎会缓存自己,直到我重新加载应用程序或等待几分钟缓存使其自身失效,它才会释放。这在开发过程中非常烦人


这个问题有什么解决方案吗?

这似乎与发生xhtml编译错误时,JBoss缓存似乎没有更新有关。最有可能出现错误。

这似乎与发生xhtml编译错误时,JBoss缓存似乎没有更新有关。很可能是Bug。

我也有同样的问题。你找到解决方案了吗?不是一个具体的解决方案,但自从我切换IDE后,问题就消失了,所以它可能与此有关。我以前使用Netbeans并从IDE运行服务器。现在,我使用一个似乎运行良好的ant脚本更新资源。可能是时间戳的问题,我也有同样的问题。你找到解决方案了吗?不是一个具体的解决方案,但自从我切换IDE后,问题就消失了,所以它可能与此有关。我以前使用Netbeans并从IDE运行服务器。现在,我使用一个似乎运行良好的ant脚本更新资源。这可能是时间戳问题。