可参考这里:
《如何实现Struts 数据库应用程序》,通过DAO实现。详情见下面:
__________________________________
http://dev.csdn.net/user/kui
http://javaweb.51.net/
http://javawebStudio.51.net/
http://javaweb.getbbs.com/下载《Struts开发实例》地址:
http://www.infoxa.com/asp/book/xxnr.asp?id=1333
JavaWebStudio 2005下载地址:
——————————————————————————————
ftp://61.155.65.187/upload/
用户:lhbup
密码:lhbup

解决方案 »

  1.   

    <logic:iterate indexId="index" id="consignmentList" 
       name="Form" property="consignmentList">
        <%@ include file="body.inc" %>
    </logic:iterate>form 里有
    private java.util.ArrayList consignmentList = new java.util.ArrayList();
      

  2.   

    网页*******************************
    <%@ page contentType="text/html; charset=GBK" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ page import="java.util.*"%>
    <%
    model.Model m = new model.Model();
    m.setId("1");
    m.setName("FuncReal");model.Model m2 = new model.Model();
    m2.setId("2");
    m2.setName("Mary");List s = new ArrayList();
    s.add(m);
    s.add(m2);request.setAttribute("s",s);
    %><html>
    <head>
    <title>
    jsp1
    </title>
    </head>
    <body bgcolor="#ffffff">
    <table width="100%"  border="1">
      <tr>
        <td>id</td>
        <td>名称</td>
      </tr>
      
      <logic:iterate id="item" name="s">
      <tr>
        <td><bean:write name="item" property="id"/></td>
        <td><bean:write name="item" property="name"/></td>
      </tr>
      </logic:iterate>
      
      
    </table>
    </body>
    </html>Model******************************
    package model;public class Model {
        private String id;
        private String name;
        public Model() {
        }
        public String getId() {
            return id;
        }
        public String getName() {
            return name;
        }
        public void setId(String id) {
            this.id = id;
        }
        public void setName(String name) {
            this.name = name;
        }
        
    }
      

  3.   

    funcreal(new PLMM[Integer.MAX_VALUE]) 网页中包含java代码好吗?我主要对struts-config.xml中的配置不是很清楚,首先谢谢上面各位的帮忙,但是,是否可以把struts-config.xml的具体配置也写一写。
      

  4.   

    现在已经做出来了,但是问题又来了。现在是一个表格现实customer的情况,但是我想在custid上做个链接,比如说viewdetail.do,然后传参数viewdetail.do?custid=custid,但是这要怎么传呢?每个都不一样阿。
      

  5.   

    <html:link action="/viewdetail.do" 
    paramId="custid" 
    paramName="custform" 
    paramProperty="custid">
    asdfasdf
    </html:link>