一、
list.jsp如下
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!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>
<h1>User List</h1>
1. <br/>
${username}-------${password } <br/>
<s:property value="username"/>------<s:property value="password"/> <br/>
<s:property value="#root[1].username"/> <br/>
2. <br/>
${aaa}-------${bbb } <br/>
<s:property value="#aaa"/>------<s:property value="#bbb"/> ------<s:property value="#ccc"/> <br/>
3. <br/>
${hello}<br/>
<s:property value="#request.hello"/> <br/>
4.<br/>
<s:debug/>
</body>
</html>
在浏览器中输入: http://localhost:8080/struts01_5/User_list.action 结果如下
点击 [Debug]超链接 得到