我对websphere自由档案很陌生
liberty是否提供了编译jsps和ejbs的ant任务?
完整档案中也提供了相同的信息,我们正在使用这些目标来构建我们的应用程序
例如,对于jsp编译类名称为(com.ibm.websphere.ant.tasks.jspC)
,对于ejb任务类名称为(com.ibm.websphere.ant.tasks.WsEjbDeploy)
。我找不到那些自由的人。我们在wlp-anttasks.jar
中只看到与服务器,部署和取消部署相关的目标
我们是否需要在自由配置文件之外构建应用程序并仅部署它。
答案 0 :(得分:1)
据我所知,Liberty概要文件没有提供预编译JSP的方法。 IBM可能支持在完整配置文件中使用JSP批处理编译器的二进制文件,但是没有记录该支持,因此我建议首先询问IBM支持。
作为替代方法,您可以尝试在ibm-web-ext.xml中指定prepareJSPs属性。有关详细信息,请参阅知识中心中的Configuring JSP engine parameters和Pre-touch tool for compiling and loading JSP files主题。请注意,此选项将导致在首次启动应用程序时编译JSP,这与预编译不完全相同,因为每次重新部署应用程序时都会重新编译JSP。
答案 1 :(得分:0)
The scenario of pre-compiling JSP files in Full Profile with the JspBatchCompiler then dropping them in to Liberty is not supported. There are some differences between the translated JSP files in Full Profile and Liberty that I think could cause problems in more complex environments / applications.
The workaround / solution to not having a JspBatchCompiler in Liberty was already posted by bkail. Which is to set prepareJSPs=0. This will cause Liberty to compile all the JSPs when the application is started (by default, on first request). Also, you can add the deferServletLoad=false to load/start the application at Liberty startup, effectively causing all the JSPs to be compiled then instead of at first request.