在Action中我定义了session代码如下:
request.getSession().setAttribute("searchInfo", entityArray);
在jsp页面中的代码如下:
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
.
.
.
.
<html:form action="/FactoryEntryAction.do">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="60%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="40%" align="right">name: </td>
<td align="left"><html:text property="nounyuKoujoCd" size="13"/></td>
</tr>
.
.
.
<tr>
<td align="right"><html:button property="log" onclick="onLBClk();" value="login" /></td>
<td align="left"><html:button property="search" onclick="onSBClk();" value="view" /></td>
</tr>
</table>
</td>
</tr>
</table>
</html:form>
<logic:present name="searchInfo">
<logic:iterate id="searchInfo" name="searchInfo" scope="request">
<table>
<tr>
<td align="center">xxx</td>
</tr>
<tr>
<td align="center">
<bean:write name="searchInfo" property="kigyoCd" filter="true"/>
</td>
</tr>
</table>
</logic:iterate>
</logic:present>
<logic:notPresent name="searchInfo">
searchInfo not present
</logic:notPresent>
.
.
分享到:
相关推荐
jsp脚本和<logic:iterate>标签:实现循环和分支逻辑 jsp脚本和<logic:iterate>标签:实现循环和分支逻辑 jsp脚本和<logic:iterate>标签:实现循环和分支逻辑
1. Map里存放的是bean时<br><br><logic:iterate id="destMap" name="srcMap"><br><br> <bean:define id="bean" name="destMap" property="value" /><br><br> <bean:write name="bean" property="name" /><br><br></...
</logic:present> <logic:notPresent name="loginFormBean"> <input type="text" name="username"> </logic:notPresent> <html:errors property="username" /></td> </tr> <tr> <td><bean:message key=...
16.3.1、<logic:present>标签和<logic:notPresent>标签 16.3.2、<logic:empty>标签和<logic:notEmpty>标签 16.3.3、关系运算标签 16.3.4、<logic:iterate>标签 16.3.5、重定向标签:<logic:redirect> 16.4...
16.3.1、<logic:present>标签和<logic:notPresent>标签 16.3.2、<logic:empty>标签和<logic:notEmpty>标签 16.3.3、关系运算标签 16.3.4、<logic:iterate>标签 16.3.5、重定向标签:<logic:redirect> 16.4...
<br> </td><br> </tr><br> </table><br> <table><br> <tr><br> <td WIDTH=100 bgcolor=#bfbfbf><br> 帐号<br> </td><br> <td...bfbfbf><br> 是否为主帐户<br> </td><br> </tr><br> <logic...
16.3.1、<logic:present>标签和<logic:notPresent>标签 16.3.2、<logic:empty>标签和<logic:notEmpty>标签 16.3.3、关系运算标签 16.3.4、<logic:iterate>标签 16.3.5、重定向标签:<logic:redirect> 16.4、...
16.3.1、<logic:present>标签和<logic:notPresent>标签 16.3.2、<logic:empty>标签和<logic:notEmpty>标签 16.3.3、关系运算标签 16.3.4、<logic:iterate>标签 16.3.5、重定向标签:<logic:redirect> 16.4、...
16.3.1、<logic:present>标签和<logic:notPresent>标签 16.3.2、<logic:empty>标签和<logic:notEmpty>标签 16.3.3、关系运算标签 16.3.4、<logic:iterate>标签 16.3.5、重定向标签:<logic:redirect> 16.4、...
16.3.1、<logic:present>标签和<logic:notPresent>标签 16.3.2、<logic:empty>标签和<logic:notEmpty>标签 16.3.3、关系运算标签 16.3.4、<logic:iterate>标签 16.3.5、重定向标签:<logic:redirect> 16.4...
<bean:write name="td" property="value"/></logic:notEqual> <logic:equal name="td" property="value" value=""> </logic:equal> </td> </logic:iterate> </tr> </html:link> </logic:iterate>
16.3.1、<logic:present>标签和<logic:notPresent>标签 16.3.2、<logic:empty>标签和<logic:notEmpty>标签 16.3.3、关系运算标签 16.3.4、<logic:iterate>标签 16.3.5、重定向标签:<logic:redirect> 16.4、...
16.3.1、<logic:present>标签和<logic:notPresent>标签 16.3.2、<logic:empty>标签和<logic:notEmpty>标签 16.3.3、关系运算标签 16.3.4、<logic:iterate>标签 16.3.5、重定向标签:<logic:redirect> 16.4...
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <HTML> <head> <title>用户登录</title> </head> <body> <h2 align="center"> 队长登陆 </h2> <hr width="100%"> ...
<logic:equal value="true" name="page" property="hasPrePage"> <a href="getConsultationAUser.do?index=first&msg=${msg }">首页</a> <a href="getConsultationAUser....
<logic:present name = "list"> <logic:iterate id="temp" name ="list"> <tr align="center"> <td><bean:write name="temp" property="userName"/></td> <td><bean:write name="temp" ...
这是一个关于租房信息发布的信息系统<c:...<logic:equal name="fwxx" property="uid" value="${sessionScope.user.uid}"> [<a href="...">编辑</a>] [<a href="...">删除</a>] </logic:equal> ... </c:forEach>
精通struts1的logic标签的使用方法,比传统的web jsp技术更能节省代码开销,提高系统的运行效率
可以直接运行 , 可以editplues 也可以看内容
36<br>i18n: 36<br>Resource Bundle Base name 36<br>XML源文件的编码设置: 37<br>5 报表元素 37<br>选择并插入元素到报表中: 37<br>布置和元素顺序 40<br>使用元素树管理元素: 43<br>基本属性: 43<br>线 46...