首页 > 解决方案 > 长时间重新加载页面,因为 weblogic 12.2.1.3.0 触发每个页面访问都重新编译 jsp

问题描述

我使用 weblogic 12.2.1.3.0 并且每次(不仅是第一次)我访问一个网页我都会等待 2 分钟以使其呈现,因为 weblogic 显然会重新编译它包含的所有 jsps。每个页面都由使用 apache tile 3.0 的片段组成,使用如下定义:

<definition name="includeTemplate" template="/WEB-INF/jsp/templates/includeTemplate.jsp">
  <put-attribute name="content" value="/WEB-INF/jsp/index.jsp"/>
  <put-attribute name="headContent" value=""/>
  <put-list-attribute name="dialogs">
    <add-attribute value="messageDialogDef"/>
    <add-attribute value="validationDialogDef"/>
    <add-attribute value="detailDialogDef"/>
  </put-list-attribute>
</definition>

Weblogic 在它的日志文件中抛出了很多这样的消息:

<BEA-101360> <Recompiling JSP [ServletContext@1759767545[app:app-ear_ear module:/app path:null spec-version:3.1]], resource [/WEB-INF/jsp/templates/list/menu.jsp], because it is stale.>

我也使用 spring (mvc) 4.3.21

知道发生了什么以及如何避免进行无用的重新编译吗?

标签: jspweblogicapache-tiles

解决方案


这是一个已知的错误。WLS 12.2.1.3.0 有一个补丁


推荐阅读