Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/391.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 根据TLD,标签测试必须为空_Java_Jsp_Chat - Fatal编程技术网

Java 根据TLD,标签测试必须为空

Java 根据TLD,标签测试必须为空,java,jsp,chat,Java,Jsp,Chat,我在我的大学项目中有这个jsp文件,当试图运行它时,我得到了这个错误:根据标记文件中的TLD或属性指令,属性测试不接受任何表达式。我该怎么做才能修好它?谢谢你的夸奖 <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <html> <head> <title>Chat Joined</title> </head> <body>

我在我的大学项目中有这个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>

尝试在声明中使用此选项,而不是现在使用的选项


谢谢,很好用。