Weblogic和使用include标签的问题

来源:互联网 发布:金融软件融美科技 编辑:程序博客网 时间:2024/05/24 05:02

今天发布了新的升级包,发现前台JSP页面报错,分析了一下是使用include标签的问题。这个问题在我们开发环境上没有问题,只是在Weblogic部署后报出来的。

错误信息如下:

Compilation of JSP File '/default.jsp' failed: ________________________________________ default.jsp:13:23: Error in "D:\bea\user_projects\domains\base_domain\servers\AdminServer\stage\_appsdir_OA_Manager0.3_war\OA_Manager0.3.war\top.jsp" at line 1: The page directive attribute "pageEncoding" may only be used once per JSP page.      <%@ include file="top.jsp" %>                       ^-------^ 

通过分析错误,include页面和被include页面同时存在pageEncoding,引起冲突。所以解决办法如下:

(1) 把静态包含改成动态包含<jsp:include page=”top.jsp”/>。
(2) 删除其中被包含页面的pageEncoding声明。