jsp 编译不能与 jboss 一起动态进行
可以在应用程序部署期间或jboss启动期间编译jsp吗?通常jsp是即时编译的,但如果编译之前完成会很方便...
我读到不可能再用jee6预编译jsp...这就是为什么jboss 6不提供库的原因。还有其他方法吗这样做?
提前致谢!
It is possible to compile jsp during the application deployment or during jboss startup? Usually jsp are compiled on the fly but it would be convenient if the compilation was done before...
I read it is not possible anymore to precompile jsp wit jee6... That's why libraries are not supplied with jboss 6. Is there another way to do that?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要修改 $server/deploy/jbossweb.sar/web.xml 并使 jsp servlet 包含一个肯定的检查值
请参阅标记上方的文档:
You need to modify $server/deploy/jbossweb.sar/web.xml and have the jsp servlet include a positive check value
See the docs above the tag:
我在我的开发环境中遇到了类似的问题。感谢Heiko的回答,我尝试了另一种选择,在web.xml中设置development和modificationTestInterval,如下所示。
现在我可以修改“$JBOSS_HOME\server\default\tmp\%random_crap%\war-1.0.war\WEB-INF\jsp”中的 JSP 并重新编译它,而无需重新启动 JBOSS。
另请注意,JBoss 4.3 中不需要此操作,因此对于从 4.3 升级到 5.2 的开发人员,只需注意此额外步骤即可。
I was facing similar issue in my development environment. Thanks to Heiko's answer, I tried another option by setting development and modificationTestInterval as follows in the web.xml.
Now I'm able to modify the JSPs in '$JBOSS_HOME\server\default\tmp\%random_crap%\war-1.0.war\WEB-INF\jsp' and have it recompile without restarting JBOSS.
Also want to note this was not required in JBoss 4.3, so for developers upgrading from 4.3 to 5.2 just be aware of this extra step.
默认情况下,JBoss 的最新版本(如 EAP 6)预编译所有 JSP 并使用该编译版本,直到应用程序完全重新部署。
您可以使用“Keep-Generate”和“Check-Interval”参数来修改该行为,以便 JBoss 在 JSP 更新时重新编译它们。有关这些参数的详细说明,请访问:
https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6.1/html/Administration_and_Configuration_Guide/chap-Web_Subsystem.html
问候,
贡萨洛
By default, last versions of JBoss like EAP 6 precompile all the JSP and use that coompiled version untill ther is a full redeployment of the aplication.
You can use 'Keep-Generated' and 'Check-Interval' parameters to modify that behaviour, so that JBoss recompile JSPs any time they are updated. You have a detail description of those parameters at:
https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6.1/html/Administration_and_Configuration_Guide/chap-Web_Subsystem.html
Regards,
Gonzalo