你如何开发JSF应用程序? [英] How do you develop JSF apps?

查看:128
本文介绍了你如何开发JSF应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在第一次工作,需要构建一个大量使用JSF(特别是ICEfaces)的webapp。有一些混合的东西要编码,包括CSS,HTML,JSP / Java,当然还有JSF。

I'm working for the first time on a project that requires building a webapp which makes heavy use of JSF (and ICEfaces in particular). There's a mix of stuff to be coded including CSS, HTML, JSP/Java and, of course, JSF.

我在Eclipse btw中完成所有这些,并使用为了运行应用程序,eclipse负责启动的本地tomcat服务器。

I'm doing all this within Eclipse btw and using a local tomcat server which eclipse is responsible for launching in order to run the app.

无论如何,我注意到这一切都相当痛苦。当我更换一块JSF时,我必须重新启动网络服务器,以便我可以查看新的结果。通常我只是想玩布局,10-15秒需要停止,重新启动,刷新是让我疯狂。我每天重启tomcat一百次 - 呃!我需要更快的周转!

Anyway, I notice all this is rather painfully slow. When I change one piece of JSF I have to restart the webserver so I can view the new results. Often I'm just interested in playing with the layout and the 10-15+ seconds it takes to stop, restart, refresh is driving me crazy. I reboot tomcat a hundred times a day -- argh! I need quicker turnaround!

我做错了吗?这是所有网站开发人员的自然状态吗​​?

Am I doing something wrong? Is this the natural state for all you web developers?

推荐答案

我正在使用几乎相同的配置(Tomcat 5.5由我的Eclipse 3.3与JBoss Tools运行)在JSF中开发我的应用程序。
我也在使用Facelets的JSF,并且web.xml中有一个重要的上下文参数,我可以设置为了能够使用自动刷新修改我的XHTML文件(即我不需要重新启动Tomcat看到我的变化)。
所以,在我的web.xml中,我有这样的:

I am developing my applications in JSF with almost the same configuration (Tomcat 5.5 run by my Eclipse 3.3 with JBoss Tools). I am using also Facelets for JSF, and there is an important context parameter in web.xml I can to set in order to be able to modify my XHTML files with an automatic refresh (i.e. I don't need to restart Tomcat to see my changes). So, in my web.xml, I have this:

<context-param>
    <param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
    <param-value>1</param-value>
</context-param>

这篇关于你如何开发JSF应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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