(Quick Reference)

6.2.1.1 变量和作用域 - Reference Documentation

Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith

Version: null

6.2.1.1 变量和作用域

Within the <% %> brackets you can declare variables:

<% now = new Date() %>

and then access those variables later in the page:

<%=now%>

Within the scope of a GSP there are a number of pre-defined variables, including:

<% %>内,你可以声明变量:

<% now = new Date() %>

然后在页面中访问使用这些变量:

<%=now%>

在GSP的作用域内,已经存在一些预定义的变量,它们是: