Mar*_*enz 6 java foreach jsf jstl
嗨,我得到以下代码:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core"
>
<h:body>
<c:forEach items="#{backingBean.personList}" var="person">
<h:outputText value="#{person.name}" />
</c:forEach>
</h:body>
</html>
Run Code Online (Sandbox Code Playgroud)
这失败了:
java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.LoopTagStatus
Run Code Online (Sandbox Code Playgroud)
我使用jstl-impl-1.2.jar.有人能帮我这个吗?谢谢
马塞尔
Sea*_*oyd 13
我想你错过了一个JSTL-api jar.
sonatype的nexus上的类名搜索返回了这个maven依赖:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
如果您不使用maven,可以从此页面下载.
您还可以使用Findjar.com查找该类的出现次数.
那么standard.jar呢?
你在WEB-INF/lib中有两个JAR吗?
| 归档时间: |
|
| 查看次数: |
14126 次 |
| 最近记录: |