如鵬網(wǎng) 大學(xué)生計(jì)算機(jī)學(xué)習(xí)社區(qū)

          CowNew開源團(tuán)隊(duì)

          http://www.cownew.com 郵件請(qǐng)聯(lián)系 about521 at 163.com

            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            363 隨筆 :: 2 文章 :: 808 評(píng)論 :: 0 Trackbacks

             在開發(fā)程序的時(shí)候熱加載是非常有幫助的,這能大大簡化我們開發(fā)調(diào)試的速度。在使用tapestry開發(fā)的時(shí)候,只要是啟動(dòng)了調(diào)試模式,那么代碼的熱替換是自動(dòng)被JVM支持的,也就是只要我們的tapestry運(yùn)行在調(diào)試模式下,就可以實(shí)現(xiàn)java代碼的即時(shí)修改即時(shí)生效。但是tapestry的頁面文件(.page和.html模板)默認(rèn)是無法實(shí)現(xiàn)熱加載的,每次修改頁面都必須重啟服務(wù)器,大大降低了開發(fā)速度。其實(shí)解決這個(gè)問題只要增加虛擬機(jī)參數(shù)就可以了,只要在虛擬機(jī)參數(shù)(注意不是應(yīng)用參數(shù))中加入:-Dorg.apache.tapestry.enable-reset-service=true -Dorg.apache.tapestry.disable-caching=true即可。這樣每次修改的時(shí)候tapestry就不會(huì)去緩存中取了,其中org.apache.tapestry.enable-reset-service的意思是:If not specified as "true", then the reset service will be non-functional. The reset service is used to force the running Tapestry application to discard all cached data (including templates, specifications, pooled objects and more). This must be explicitly enabled, and should only be used in development (in production, it is too easily exploited as a denial of service attack).

          Unlike most other configuration values, this must be specified as a JVM system property.

          posted on 2007-06-05 19:13 CowNew開源團(tuán)隊(duì) 閱讀(429) 評(píng)論(0)  編輯  收藏

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 建昌县| 永川市| 鹿泉市| 北安市| 江达县| 柘城县| 鄂温| 崇仁县| 从江县| 潞西市| 南木林县| 微山县| 南澳县| 娱乐| 嘉峪关市| 墨玉县| 永寿县| 灵山县| 乳山市| 宿州市| 丹东市| 肥乡县| 仁寿县| 连城县| 双鸭山市| 永年县| 靖西县| 巴彦县| 织金县| 温州市| 永德县| 临海市| 沅陵县| 陈巴尔虎旗| 方正县| 池州市| 衢州市| 西昌市| 留坝县| 萨迦县| 江北区|