jsp 表达式标签报错
Expression Tag is used to print out java language expression that is put between the tags. An expression tag can hold any java language expression that can be used as an argument to the out.print() method. Syntax of Expression Tag
表达式标签用于打印出放置在标签之间的Java语言表达式。 表达式标签可以包含任何可用作out.print()方法的参数的Java语言表达式。 表达标签的语法
<%= Java Expression %>
When the Container sees this
当容器看到这个
<%= (2*5) %>
It turns it into this:
它变成这样:
out.print((2*5));
Note: Never end an expression with semicolon inside Expression Tag. Like this:
注意:切勿在表达式标签内使用分号结束表达式。 像这样:
<%= (2*5); %>
表达式标签示例 (Example of Expression Tag)
<html>
<head>
<title>My First JSP Page</title>
</head>
<%
int count = 0;
%>
<body>
Page Count is <%= ++count %>
</body>
</html>
翻译自: https://www.studytonight.com/jsp/jsp-expression-tag.php
jsp 表达式标签报错