【发布时间】:2015-04-04 03:35:44
【问题描述】:
运行我的代码后,我收到以下错误:
HTTP 错误 500
访问 /index.jsp 时出现问题。原因:
java.lang.NoClassDefFoundError: org/apache/xpath/XPathException
我在 index.jsp 文件中正确声明了标记库:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
这里是我尝试解析 XML 文件的地方:
<select class="form-control" style="width:40rem;">
<!-- Open Data -->
<c:import var="sportInfo" url="http://data.nantes.fr/api/publication/24440040400129_NM_NM_00024/LOC_EQUIPUB_SPORT_NM_STBL/content/?format=xml"/>
<x:parse xml="${sportInfo}" var="output"/>
<x:forEach select="$output/document/data/element/geo/name" var="item">
<option value="$output/document/data/element/_IDOBJ"><x:out select="$item" /></option>
</x:forEach>
</select>
我已经在网上查了一下,尝试了不同的解决方案,包括将 Xalan 添加到我的项目的构建路径中,但到目前为止还没有结果。
提前致谢。
【问题讨论】:
标签: xml jsp google-app-engine xpath jstl