是否可以在部署应用程序或jboss启动时编译jsp?通常 jsp 是动态编译的,但如果编译在之前完成会很方便...
我读到不可能再使用 jee6 预编译 jsp...这就是为什么 jboss 6 不提供库的原因。还有其他方法吗?
提前致谢!
最佳答案
您需要修改 $server/deploy/jbossweb.sar/web.xml 并让 jsp servlet 包含一个正校验值
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>checkInterval</param-name>
<param-value>1</param-value>
</init-param>
查看标签上方的文档:
<!-- checkInterval If development is false and checkInterval is -->
<!-- greater than zero, background compilations are -->
<!-- enabled. checkInterval is the time in seconds -->
<!-- between checks to see if a JSP page needs to -->
<!-- be recompiled. [0] -->
<!-- -->
<!-- modificationTestInterval -->
<!-- Causes a JSP (and its dependent files) to not -->
<!-- be checked for modification during the -->
<!-- specified time interval (in seconds) from the -->
<!-- last time the JSP was checked for -->
<!-- modification. A value of 0 will cause the JSP -->
<!-- to be checked on every access. -->
<!-- Used in development mode only. [4] -->
关于java - Jsp 编译不是用 jboss 即时进行的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5786610/