【发布时间】:2010-09-14 23:06:17
【问题描述】:
我有纯 HTML 文件,我想在其中包含一些 JSTL 标记,首先我尝试这是否有效。 但不知何故,JSTL 标签现在在渲染后显示了价值。代码如下:
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org/"
xmlns:c="http://java.sun.com/jstl/core">
<body>
<c:set var="test" value="success" />
<c:out value="${test}"/>
</body>
</html>
我的 web.xml 有:
<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
我还将 jstl-1.2.jar 添加到我的 web-inf/lib 文件夹中。
问题是我在我的 html 页面上没有看到任何内容。我期待看到“成功”。有什么建议吗?
【问题讨论】: