当前位置: 代码迷 >> 应用服务器 >> weblogic运行时报jsp编译错误,着急再线等多谢
  详细解决方案

weblogic运行时报jsp编译错误,着急再线等多谢

热度:10364   发布时间:2013-02-26 00:00:00.0
weblogic运行时报jsp编译异常,着急再线等谢谢。
运行环境是:AIX,weblogic10.3,JDK1.6

该应用在tomcat和websphere上运行都没问题。先在weblogic下运行报错信息如下:

weblogic.servlet.jsp.CompilationException: Failed to compile JSP /UI/mobilebank/infoselect/userInfo/userInfoList.jsp
userInfoList.jsp:10:5: Invalid tag library.
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
  ^----^
userInfoList.jsp:10:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.

userInfoList.jsp:11:5: Invalid tag library.
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
  ^----^
userInfoList.jsp:11:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
..............
 at weblogic.servlet.jsp.JavelinxJSPStub.compilePage(JavelinxJSPStub.java:328)
  at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:237)
  at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:182)
  at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
  at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408)
  Truncated. see log file for complete stacktrace

jsp页面中代码如下:
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tld/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tld/struts-tiles.tld" prefix="tiles" %>


web.xml中配置如下:
<jsp-config>
  <taglib>
  <taglib-uri>http://jakarta.apache.org/struts/tags-bean&lt;/taglib-uri>
  <taglib-location>/WEB-INF/tld/struts-bean.tld</taglib-location>
  </taglib>
........
</jsp-config>

tld文件在对应目录下确定已经存在。

weblogic.xml中配置如下参数:

 <container-descriptor>
  <prefer-web-inf-classes>true</prefer-web-inf-classes>
  </container-descriptor>





------解决方案--------------------------------------------------------
放置或者配置的标签库路径不对,找不到需要的标签库。
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
去确认一下相对的路径对不对。不对就改,如果看起来象是对的,就查下WELOGIC的配置文件,看看各个跟路径有关的配置,应该能够看出问题。
  相关解决方案