EL表达式(一)
来源:互联网 发布:淘宝店铺宣传团队抽成 编辑:程序博客网 时间:2024/06/06 14:11
<%@page import="java.util.Date"%>
<%@page import="com.test.Customer"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!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=UTF-8">
<title>Insert title here</title>
</head>
<body>
time:${time}<br/>
time:${applicationScope.time}<br/>
time:<%=application.getAttribute("time") %>
<%
request.setCharacterEncoding("UTF-8");
%>
<form action="el.jsp" method="post">
userName:<input type="text" name="username" value="<%=request.getParameter("username")==null?"":request.getParameter("username")%>"/><br/>
userName:<input type="text" name="userName" value="${param.username}"/><br/>
<input type="submit" value="Submit"/><br/>
userName:<%=request.getParameter("username")==null?"":request.getParameter("username") %>
<br/><br/>
<jsp:useBean id="customer" class="com.test.Customer" scope="session"></jsp:useBean>
<jsp:setProperty property="age" value="20" name="customer"/>
age:<%
Customer customer2=(Customer)session.getAttribute("customer");
out.print(customer2.getAge());
%><br/>
age:<jsp:getProperty property="age" name="customer"/><br/><br/>
<a href="el2.jsp?score=89&name=A&name=B&name=C">To El2 Page</a>
<%
application.setAttribute("time", new Date());
%>
</form>
</body>
</html>
<%@page import="com.test.Customer"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!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=UTF-8">
<title>Insert title here</title>
</head>
<body>
time:${time}<br/>
time:${applicationScope.time}<br/>
time:<%=application.getAttribute("time") %>
<%
request.setCharacterEncoding("UTF-8");
%>
<form action="el.jsp" method="post">
userName:<input type="text" name="username" value="<%=request.getParameter("username")==null?"":request.getParameter("username")%>"/><br/>
userName:<input type="text" name="userName" value="${param.username}"/><br/>
<input type="submit" value="Submit"/><br/>
userName:<%=request.getParameter("username")==null?"":request.getParameter("username") %>
<br/><br/>
<jsp:useBean id="customer" class="com.test.Customer" scope="session"></jsp:useBean>
<jsp:setProperty property="age" value="20" name="customer"/>
age:<%
Customer customer2=(Customer)session.getAttribute("customer");
out.print(customer2.getAge());
%><br/>
age:<jsp:getProperty property="age" name="customer"/><br/><br/>
<a href="el2.jsp?score=89&name=A&name=B&name=C">To El2 Page</a>
<%
application.setAttribute("time", new Date());
%>
</form>
</body>
</html>
0 0
- EL表达式(一)
- EL表达式(一)
- 一址:el表达式的转义字符
- 由JSP到 EL表达式(一)
- JSP详解(一):页面构成、EL表达式
- tomcat6关于el表达式的一大坑!
- EL 表达式的用法(一)--获取数据
- SpringMVC学习之EL表达式一
- 【EL】EL表达式
- EL表达式
- EL表达式
- EL表达式
- EL表达式
- EL表达式
- EL表达式
- EL表达式
- EL表达式
- el表达式
- Hibernate的clear(),flush(),evict()方法详解
- JAVA笔试总结
- Jstl标签(一)
- professional English
- MySQL Server5.7 1045 28000cuowu
- EL表达式(一)
- 357. Count Numbers with Unique Digits
- cocos lua 中, 动画文件让其调到指定的帧数
- doom3 entitydef实体定义
- CM5.9安装基于MariaDB
- LPC5411x_FreeRTOS学习笔记
- css3
- EL表达式(二)
- git ssh 免密码登录方法