日期:2014-05-17 浏览次数:20835 次
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'index.jsp' starting page</title>
</head>
<body>
<s:debug></s:debug>
姓名:
<s:property value="name" />
<br /> 日期:
<s:date name="dt" format="yyyy年MM月dd日" />
<br /> Request Message:
<s:property value="#request.msg.length()" />
<br /> Session Message:
<s:property value="#session.msg" />
<br /> Attr Message:
<s:property value="#attr.msg" />
<br /> 价格:
<s:property value="price" />
<s:if test="price > 10000">太贵了</s:if>
<s:else>
太便宜了
</s:else>
<br> 性别:<s:if test='sex.equals("M")'>男性</s:if>
<s:else>女性</s:else>
<hr>
<ul>
<s:iterator value="adds" var="address" status="stas">
<li><s:property value="#stas.even" />
<s:property value="#address.zipcode" />
<s:property value="#address.street"/></li>
</s:iterator>
</ul>
<s:bean name="cloud305.action.ModelBean" var="myBean"></s:bean>
<s:property value="#myBean.hello"/>
<s:debug></s:debug>
</body>
</html>