当前位置: 首页 > resin > 正文

resin jsp auto-compile

因为resin的自动编译及热部署的特性颇受大家的欢喜,这里总结一下resin2.x下关于自动编译的问题

Resin中 “resin.conf” 自动编译的设置:

1.class-update-interval
  检测servlet更新的时间间隔,默认值2秒
  使用:在  <http-server>标签下:
  <class-update-interval>2s</class-update-interval>
 
2.config-update-interval
  检测配置文件configuration更新的时间间隔,默认值为class-update-interval指定的值 
  使用:在  <http-server>标签下:
  <config-update-interval>2s</config-update-interval> 
 
3.jsp-update-interval
  检测jsp文件的更新时间:默认值为class-update-interval指定的值 
  使用:
  <jsp jsp-update-interval=’300s’ precompile=’true’ static-encoding=’true’ recompile-on-error=’true’/>
  其中: precompile 预编译
         static-encoding  允许静态字符编码,默认为true

一般来讲生产环境还是要加大resin对class文件的变化检测的时间间隔,或者干脆不允许扫描。
如果以上方法都无效的话,只能使出俺的必杀技–在jsp标签中添加这句话 auto-compile=’false’ ,意为不允许编译!

具体请见resin的官网相关介绍!
http://caucho.com/resin-2.1/ref/app-config.xtp#config-update-interval
 
<class-update-interval>s</class-update-interval>

jsp-update-interval
auto-compile

<jsp auto-compile=’false’ jsp-update-interval=’300s’ precompile=’true’ static-encoding=’true’ recompile-on-error=’true’/>

class-update-interval
    Resin 1.1
Interval in seconds between checking for servlet updates. For development, this can be set to 0 or to a small number to pick up new servlet versions quickly. For deployment, class-update-interval can be large to avoid the overhead of checking for updates.
The default value is 2 seconds.

config-update-interval
    Resin 2.0

Interval in seconds between checking for configuration updates. For development, this can be set to 0 or to a small number to pick up new configuration file versions quickly. For deployment, config-update-interval can be large to avoid the overhead of checking for updates.

The default value is the value of class-update-interval.

本文固定链接: http://2hei.net/resin_jsp_autocompile.html | 2hei's site

该日志由 2hei 于2008年08月05日发表在 resin 分类下,
原创文章转载请注明: resin jsp auto-compile | 2hei's site
关键字:

报歉!评论已关闭.