脚本程序
脚本程序可以包含任意量的Java语句、变量、方法或表达式,只要它们在脚本语言中是有效的。
脚本程序的语法格式:
<% 代码片段 %>
或者,也可以编写与其等价的XML语句,就像下面这样:
<jsp:scriptlet> ??代码片段</jsp:scriptlet>
任何文本、HTML标签、JSP元素必须写在脚本程序的外面。
<html><head><title>Hello World</title></head><body>Hello World!<br/><%out.println("Your IP address is " + request.getRemoteAddr());%></body></html>
JSP 语法
原文地址:http://www.cnblogs.com/pgone/p/7614693.html