与html相当的常用标签
struts1
<%@ taglib uri="/WEB-INF/taglibs/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/taglibs/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/taglibs/struts-logic.tld" prefix="logic" %>
struts2
<%@ taglib prefix="s" uri="/struts-tags"%>
1.<input type="text" style="" id="">输入
struts1
<html:text name="GPM020FormBean" property="couponTitle" maxlength="30" style="width:732px;" styleId="" styleClass="inputTxt"/>styleId等于id,styleClass等于class
struts2
<s:textfield name="ga050m01FormBean.mkaiinTblDetailDaoBean.loopKaiinId" size="20" maxlength="20" readonly="true" cssStyle="background-color:#DDDDDD;" tabindex="-1" id="loopKaiinId" />
2.textarea
struts1
<html:textarea name="GPM020FormBean" property="couponDesc" cols="70" rows="8" styleClass="inputTxt"></html:textarea>
struts2
<s:textarea name="ga050m01FormBean.mkaiinTblDetailDaoBean.memo" cols="105" rows="5" maxlength="4000"></s:textarea>3.input 输出
struts1
<bean:write name="GPM020FormBean" property="msgCouponTitle" />
struts2
<s:property value="ga050m01FormBean.hidLoopKaiinId"/>
3.循环
struts1
没有
struts2
<s:if test="#session.GA050M01FormBean.mapInUpFlg != null"> <s:iterator value="#session.GA050M01FormBean.mapInUpFlg" status="i" id="inUpFlg"> <s:if test="ga050m01FormBean.mkaiinTblDetailDaoBean.inUpFlg == #inUpFlg.getKey()"> <input name="ga050m01FormBean.mkaiinTblDetailDaoBean.inUpFlg" type="radio" id="inUpFlg${i.index}" value='<s:property value="#inUpFlg.getKey()"/>' onclick="selInsPtn();selHonKariPtn();" checked><s:property value="#inUpFlg.getValue()"/> </s:if> <s:else> <input name="ga050m01FormBean.mkaiinTblDetailDaoBean.inUpFlg" type="radio" id="inUpFlg${i.index}" value='<s:property value="#inUpFlg.getKey()"/>' onclick="selInsPtn();selHonKariPtn();" ><s:property value="#inUpFlg.getValue()"/> </s:else> </s:iterator> </s:if>
4. form
struts1
<html:form enctype="multipart/form-data" action="/GPM020_02ConfirmAction" method="post">
struts2
<s:form method="POST" action="GA050M01.do" name="form1">
5.html
struts1
<html:html>
struts2
没有
6.input hidden
struts1
<html:hidden name="GPM020FormBean" property="topImagePath" styleId="detHidden03"/>
struts2
<s:hidden name="ga050m01FormBean.hidRequestNo" id="hidRequestNo" />
7.select
struts1
<html:select name="GPM020FormBean" property="groupKigyoKakusyaService" size="1" onchange="setListValue('3',this.value);" styleClass="selectBox2"> <html:option value=""></html:option> <c:forEach var="groupKigyoKakusyaService" items="${GPM020FormBean.groupKigyoKakusyaServiceList}" begin="0" varStatus="status"> <html:option value="${groupKigyoKakusyaService.parameterName}"><c:out value="${groupKigyoKakusyaService.biko}"></c:out></html:option> </c:forEach> </html:select>
struts2
<s:select name="ga050m01FormBean.mkaiinTblDetailDaoBean.kbukkenPrmCode" list="#session.GA050M01FormBean.mapBukkenPrmCode" listKey="key" listValue="value" id="kBukkenPrmCode" cssStyle="width:55px;"> </s:select>
8.radio
struts1
<c:forEach var="hyojiFlg" items="${GPM050FormBean.mapHyoujiFlg}" begin="0" varStatus="lbStatus"> <html:radio name="GPM050FormBean" property="hyojiFlg" value="${hyojiFlg.key}"> ${hyojiFlg.value} </html:radio> </c:forEach>
struts2
<s:raido>同select