开发者

ricfaces xhtml edit problem for jetty

开发者 https://www.devze.com 2023-01-30 12:28 出处:网络
I am using Richfaces with facelets (xhtml). I use maven jetty plugin for development. When jetty is running, I modify a xhtml file but the change does not work until I restart jetty.

I am using Richfaces with facelets (xhtml). I use maven jetty plugin for development.

When jetty is running, I modify a xhtml file but the change does not work until I restart jetty.

Here is my maven jetty plugin configuration:

<plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <version>6.1.9</version>
                <configuration>
                    <jettyEnvXml>${basedir}/src/test/resources/${jetty-env-file}</jettyEnvXml>
                    <webDefaultXml>${basedir}/src/test/resources/webdefault.xml</webDefaultXml>
                </configuration>
</plugin>
开发者_开发问答

When I edit css, jsp or html files I can see the changes without restarting.

But for xhtml files in every change I need to restart jetty again and again.

Is there any solution for that?

Thanks


I found the solution. It is all about the facelet configuration parameters in web.xml. After I changed them, i can update xhtml files while jetty is up and running. Here is the link that i found appropriate facelet parameterconfiguration:

http://www.jsftoolbox.com/documentation/facelets/03-FaceletsConcepts/facelets-configuration.jsf


In case the above link ever disappears, in web.xml of your faces application do add this:


<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>
0

精彩评论

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

关注公众号