服务器信息:<%= application.getServerInfo() %>
Servlet版本:<%= application.getMajorVersion() %>.<%= application.getMinorVersion() %>

当前时间:<%= new Date() %>
请求方式:<%= request.getMethod() %>
<%-- JSP声明示例 --%>
<%!
private int visitCount = 0;
public String formatMessage(String name) {
return "欢迎您," name + "" }
%>
<%-- JSP脚本段示例 --%>
<%
visitCount++;
String userName = request.getParameter("e" if(userName == null) {
userName = "客" }
// 设置页面属性
pageContext.setAttribute("pageMessage"这是页面作用域的消息" session.setAttribute("sessionMessage"这是会话作用域的消息" application.setAttribute("appMessage"这是应用作用域的消息" %>
访问次数:<%= visitCount %>
个性化问候:<%= formatMessage(userName) %>
页面作用域:<%= pageContext.getAttribute("eMessage" %>
会话作用域:<%= session.getAttribute("sessionMessage">
应用作用域:<%= application.getAttribute("Message" %>
数学计算:25 + 37 = <%= 25 + 37 %>
字符串连接:"Hello" + "World" = <%= "" "d">
布尔表达式:10 > 5 的结果是 <%= 10 > 5 %>
<%-- JSP包含指令示例 --%>
<%@ include file=".jsp" %>