<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<<jsp:useBean id="person" class="com.ftc.test.Person"></jsp:useBean>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<h1>this is index.jsp!</h1>
<hr>
<%
String username = "ftc";
request.setAttribute("username", username);
%>
<c:out value="this is our JSTL firstDemo"></c:out>
<hr>
<input type="text" value="username" id="username" name="username" />
<input type="submit" value="submit" id="submit" name="submit" />
<c:out value="${username}">
</c:out>
<br>
<c:out value="${1+2}"></c:out>
<c:out value="${empty username}"></c:out>
<br>
<c:out value="${name }" default="error"></c:out>
<br>
<!-- 存值到scope (存储一个value的常量到var这么变量中,作用于为scope) -->
<c:set value="today" var="day" scope="session"></c:set>
<c:out value="${day }"></c:out>
<br>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<<jsp:useBean id="person" class="com.ftc.test.Person"></jsp:useBean>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<h1>this is index.jsp!</h1>
<hr>
<%
String username = "ftc";
request.setAttribute("username", username);
%>
<c:out value="this is our JSTL firstDemo"></c:out>
<hr>
<input type="text" value="username" id="username" name="username" />
<input type="submit" value="submit" id="submit" name="submit" />
<c:out value="${username}">
</c:out>
<br>
<c:out value="${1+2}"></c:out>
<c:out value="${empty username}"></c:out>
<br>
<c:out value="${name }" default="error"></c:out>
<br>
<!-- 存值到scope (存储一个value的常量到var这么变量中,作用于为scope) -->
<c:set value="today" var="day" scope="session"></c:set>
<c:out value="${day }"></c:out>
<br>