gpt4 book ai didi

java - 根据TLD标签测试必须为空

转载 作者:太空宇宙 更新时间:2023-11-04 14:04:59 25 4
gpt4 key购买 nike

我的大学项目中有这个 jsp 文件,当尝试运行它时,我收到此错误:根据标记文件中的 TLD 或属性指令,属性测试不接受任何表达式。我应该做什么来修复它?感谢您的认可。

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<html>
<head>
<title>Chat Joined</title>
</head>

<body>
<c:if test="${pageContext.request.method=='POST'}"> <-- here error happens
<c:choose>
<c:when test="${param.send!=null}">
<c:set var="chat"
value="${chat}<b>${param.uid}:</b>${param.text}<br />"
scope="application" />
</c:when>

<c:when test="${param.clear!=null}">
<c:set var="chat" value="" scope="application" />
</c:when>
</c:choose>
</c:if>

<table border="0">
<tbody>
<tr>
<td>
<h3>User:
<c:out value="${param.uid}" />
</h3>

<hr />
</td>
</tr>

<tr>
<td>
<c:out value="${chat}" escapeXml="false" />
</td>
</tr>

<tr>
<td>
<hr />

<form method="post">Message:
<input type="text" name="text" size="20" />

<input type="submit" name="send" value="Send" />

<input type="submit" name="refresh" value="Refresh" />

<input type="submit" name="clear" value="Clear" />

<input type="hidden" name="uid"
value="<c:out value="${param.uid}"/>" />

<br />
</form>
</td>
</tr>
</tbody>
</table>

最佳答案

尝试在声明中使用它而不是你现在使用的

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

关于java - 根据TLD标签测试必须为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28948947/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com