jsp 表达式标签报错_JSP表达式标签

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 表达式标签报错

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值