在加入jstl后报的错?该怎么解决,高手们帮帮忙吧~!

sigrid 2010-10-22 01:44:09
weblogic.servlet.jsp.CompilationException: Failed to compile JSP /index.jsp
index.jsp:1:1: Unable to load the validator class: "org.apache.taglibs.standard.
tlv.JstlCoreTLV".

^
index.jsp:29:5: The TagExtraInfo class : "org.apache.taglibs.standard.tei.ForEac
hTEI" specified by this tag could not be instantiated.
<c:forEach items="${voes}" var="voes">
^-------^
index.jsp:29:5: The tag handler class was not found "org.apache.taglibs.standard
.tag.rt.core.ForEachTag".
<c:forEach items="${voes}" var="voes">
^-------^
index.jsp:29:5: The tag handler class was not found "org.apache.taglibs.standard
.tag.rt.core.ForEachTag".
<c:forEach items="${voes}" var="voes">
^-------^
index.jsp:30:7: The required attribute "value" is missing.
<c:out value="${voes.save}">${voes.save}</c:out>
^---^
index.jsp:30:7: The tag handler class was not found "org.apache.taglibs.standard
.tag.rt.core.OutTag".
<c:out value="${voes.save}">${voes.save}</c:out>
^---^
index.jsp:30:19: No conversion available for the type "".
<c:out value="${voes.save}">${voes.save}</c:out>
^------------^
index.jsp:31:7: The required attribute "value" is missing.
<c:out value="${voes.city}">${voes.city}</c:out>
^---^
index.jsp:31:7: The tag handler class was not found "org.apache.taglibs.standard
.tag.rt.core.OutTag".
<c:out value="${voes.city}">${voes.city}</c:out>
^---^
index.jsp:31:19: No conversion available for the type "".
<c:out value="${voes.city}">${voes.city}</c:out>
^------------^
index.jsp:32:7: The required attribute "value" is missing.
<c:out value="${voes.count}">${voes.count}</c:out>
^---^
index.jsp:32:7: The tag handler class was not found "org.apache.taglibs.standard
.tag.rt.core.OutTag".
<c:out value="${voes.count}">${voes.count}</c:out>
^---^
index.jsp:32:19: No conversion available for the type "".
<c:out value="${voes.count}">${voes.count}</c:out>
^-------------^

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.jav
a:235)
at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(Servlet
StubImpl.java:408)
Truncated. see log file for complete stacktrace
>
...全文
417 19 打赏 收藏 转发到动态 举报
写回复
用AI写文章
19 条回复
切换为时间正序
请发表友善的回复…
发表回复
冰玉翔龙 2011-05-27
  • 打赏
  • 举报
回复
我今天也碰到这个问题,首先我在本机上使用tomcat运行该项目,一切正常,但我在weblogic上运行该项目时,就出现了这个问题,于是我对比了两个服务器下的lib目录下的jar包,发现在weblogic服务器下lib文件夹中少了三个jar包(jstl-1.2.jar、jsf-impl.jar、jsf-api.jar),于是我手动在lib文件夹下加入该三个jar包,重启weblogic测试,问题解决。
fix_huang 2010-10-25
  • 打赏
  • 举报
回复
lz,你在作用域里面放了voes吗,不检查一下,如果你request作用域里有voes,那肯定会取到值的,你在耐心检查一下,按照17楼的说法做
qianyecq 2010-10-25
  • 打赏
  • 举报
回复
[Quote=引用 15 楼 zinan_jin 的回复:]
现在页面不报错误了~!
但是获得不到值~!
[/Quote]
返回的时候有
request.setAttribute("voes", voes);吗?
调试一下返回的时候是否有数据,还有voes名字写错没
qianyecq 2010-10-25
  • 打赏
  • 举报
回复
[Quote=引用 14 楼 zinan_jin 的回复:]
这个我都加了

<%@ page language="java" pageEncoding="utf-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%@ page isELIgnored="false" %>
<%
String path = request.getContextPat……
[/Quote]
<c:forEach items="${voes}" var="voes">
${voes.save}
${voes.city}
${voes.count}
</c:forEach>

这样看看行不。


sigrid 2010-10-25
  • 打赏
  • 举报
回复
现在页面不报错误了~!
但是获得不到值~!
sigrid 2010-10-25
  • 打赏
  • 举报
回复
这个我都加了

<%@ page language="java" pageEncoding="utf-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>


<body>


<c:forEach items="${voes}" var="voes">
<c:out value="${voes.save}"></c:out>
<c:out value="${voes.city}"></c:out>
<c:out value="${voes.count}"></c:out>
</c:forEach>


</body>
</html>
这是我页面上的所有代码~!
你们看看少什么吗?
gouxiongyaya 2010-10-25
  • 打赏
  • 举报
回复
写没写这个啊,哥们
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
sigrid 2010-10-25
  • 打赏
  • 举报
回复
我加了jstl.jar和standard.jar包了,才报这个错的
小武茶庄 2010-10-23
  • 打赏
  • 举报
回复
把项目加入jstl.jar和standard.jar 再试试看
sainer 2010-10-23
  • 打赏
  • 举报
回复
少了jstl包
thy_java 2010-10-22
  • 打赏
  • 举报
回复
还有就是 有没有取到voes 判断下
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<c:choose>
<c:when test="${empty voes}">
为空
</c:when>
<c:otherwise>
<c:forEach items="${voes}" var="voes">
<c:out value="${voes.save}"></c:out>
<c:out value="${voes.city}"></c:out>
<c:out value="${voes.count}"></c:out>
</c:forEach>
</c:otherwise>
</c:choose>
thy_java 2010-10-22
  • 打赏
  • 举报
回复
<c:forEach items="${voes}" var="voes">
<c:out value="${voes.save}"></c:out>
<c:out value="${voes.city}"></c:out>
<c:out value="${voes.count}"></c:out>
</c:forEach>

正常时这么写 你要先确定你传过来的voes是不是list 是不是一个集合
qianyecq 2010-10-22
  • 打赏
  • 举报
回复
是不是缺包,或者uri写错了?
sigrid 2010-10-22
  • 打赏
  • 举报
回复
这个跟配置文件没什么关系吧~!
sigrid 2010-10-22
  • 打赏
  • 举报
回复
我jsp页面就
<c:forEach items="${voes}" var="voes">
<c:out value="${voes.save}">${voes.save}</c:out>
<c:out value="${voes.city}">${voes.city}</c:out>
<c:out value="${voes.count}">${voes.count}</c:out>
</c:forEach>
thy_java 2010-10-22
  • 打赏
  • 举报
回复
<c:out value="${voes.count}">aaaaaaa</c:out> aaaaa应该不会显示
thy_java 2010-10-22
  • 打赏
  • 举报
回复
把源码发出来看看

81,095

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧