最近听说weblogic10支持J2EE规范,下载了一个10.3版的weblogic安装后做了一个小程序(此程序用到了jstl),部署到weblogic后,启动浏览器访问该页面,可是浏览器报错了:信息如下
weblogic.servlet.jsp.CompilationException: Failed to compile JSP /index.jsp
index.jsp:3: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="http://java.sun.com/jsp/jstl/core" prefix="c" %>
^----^
index.jsp:3: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="http://java.sun.com/jsp/jstl/core" prefix="c" %>
^----^ 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
>
当我把jstl的jar包放入该工程的lib目录下,页面显示正常,这是为什么呢?J2EE规范不是集成了jstl吗?为什么还要在lib目录下加入jstl的jar包呢?
weblogic.servlet.jsp.CompilationException: Failed to compile JSP /index.jsp
index.jsp:3: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="http://java.sun.com/jsp/jstl/core" prefix="c" %>
^----^
index.jsp:3: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="http://java.sun.com/jsp/jstl/core" prefix="c" %>
^----^ 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
>
当我把jstl的jar包放入该工程的lib目录下,页面显示正常,这是为什么呢?J2EE规范不是集成了jstl吗?为什么还要在lib目录下加入jstl的jar包呢?
http://java.sun.com/jsp/jstl/core可能要写成http://java.sun.com/jsp/jstl/core_rt,自己打开.tld文件找找吧。
至于weblogic么,不知道有没有带,但你的错误首先是因为uri没有匹配对,找不到tld
J2EE规范根哪个容器必须自带哪些包没关系吧,支持就行了吧
不太确定。