English is important

:oops:   实在太差了


------------------------------
jsp里:
Iterator  显示一个String数组:
<ww:iterator value="properties" status="index">
	<ww:property />
	index =
	<ww:property value="#index.count"/>
	<p>
</ww:iterator>


action里:
	public String[] getProperties(); {
		String []back=new String[]{"1","2","3","4","5","6"};
		return back;
	}
	




<%@ page language="java" pageEncoding="GBK" %>
<%@ taglib prefix="ww" uri="/WEB-INF/taglib/webwork.tld" %>
<html>
<head>
    <title>First WebWork Example---tag-iterator</title>
</head>
<body>
<p>
TagDemoAction.java
<hr>

<ww:iterator value="properties" status="index"> 
        <ww:property /> 
        count = 
        <ww:property value="#index.count"/> 
        isfirst = 
        <ww:property value="#index.first"/> 
        islast = 
        <ww:property value="#index.last"/> 
        index = 
        <ww:property value="#index.index"/> 
        iseven = 
        <ww:property value="#index.even"/> 
        isodd = 
        <ww:property value="#index.odd"/> 
        《???》
        modulus=
        <ww:property value="#index.modulus"/> 
        <p> 
</ww:iterator>

<hr>
常量显示:
TEST = 
<ww:property value="@demo.Constants@TEST"/>
<hr>
if。。。else。。。<br>
<ww:if test="true == false">
   <b>if: Failures</b>
</ww:if>

<ww:elseIf test="true == false">
   <b>elseIf: Failure</b>
</ww:elseIf>

<ww:elseIf test="true == true">
   <b>elseIf: true==true</b>
</ww:elseIf>

<hr>
<ww:if test="1<0">
	<b>1<0</b>
</ww:if>

<ww:else>
   <b>else: 1>=0</b>
</ww:else>
<hr>


</p>
</body>
</html>

你可能感兴趣的:(java,Web,jsp,Webwork)