<logic:iterate id="gblist" name="gblist" type="vod.ShowListAction" scope="request">
这个标签你会用吗? 
应该有property=“”这个属性 也就是 你beem addmessage  中查询出来的集合
也就是你Addmessage 类中的方法getGblist()
-------------------------------------大致给你写一下----------------
<jsp:useBean id="addmessage " scope="page" class="这里就是你的Addmessage的具体位置 "/>
<logic:iterate id="list" name="addmessage " type="vod.ShowListAction" property="gblist" scope="request">
<bean:write name="list" property="username" />
</logic:iterate>

解决方案 »

  1.   

    <logic:iterate id="gblist" name="gblist" type="vod.ShowListAction" scope="request">
    <bean:write name="gblist" property="username" />
    </logic:iterate>
    这段代码错误很多。改为下面的再试一下。嘿嘿
    <logic:iterate id="userInfo" name="gblist" type="loginForm" scope="request">
    <bean:write name="userInfo" property="username" />
    </logic:iterate>
      

  2.   

    问题有二:
    一:方法
    public ArrayList getGblist() throws Exception
      {
           Statement ps=null;
           ResultSet rs=null;
           ArrayList gblist = new ArrayList();
           con=Database.getConnection();
           try
           {
           String sql="select * from [user]";
           ps=con.createStatement();
           rs=ps.executeQuery(sql);
           while(rs.next())
           {
           loginForm gb=new loginForm();
           gb.setUsername(rs.getString("username"));
           gb.setPassword(rs.getString("password"));
           gb.setEmail(rs.getString("email"));
           gblist.add(gb);
           gb=null;
           System.out.println(gblist);
           }
           }
           catch(Exception e)
           {
       System.out.print("Query Data Error:" + e.getMessage());
           }
      return gblist;
      }修改成:
    public ArrayList getGblist() throws Exception
      {
           Statement ps=null;
           ResultSet rs=null;
           ArrayList gblist = new ArrayList();
           con=Database.getConnection();
           try
           {
           String sql="select * from [user]";
           ps=con.createStatement();
           rs=ps.executeQuery(sql);
                    ResultSetMetaData rsmd=rs.getMetaData();
                    int colCount=rsmd.getColumnCount();
             while(rs.next())
           {
                              HashMap hm = new HashMap();
                              for(int i=1;i<colCount;i++)
            {
                               String name=rsmd.getColumnName(i);
                               hm.put(name,rs.getObject(i));
            }
                             gblist.add(hm);
                             rs.next();
         
           }
           }
           catch(Exception e)
           {
       System.out.print("Query Data Error:" + e.getMessage());
           }finally
            {
                  try{
                         rs.close();
                         con.close();
                      }catch(Exception e){}
              }
      return gblist;
      }二:
    view.jsp    将数据显示出来<%@ 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" %>
    <html>
    <body bgcolor="#ffffff">
    <logic:iterate id="gblist" name="gblist" type="vod.ShowListAction" scope="request">
    <bean:write name="gblist" property="username" />
    </logic:iterate></body>
    </html>
    改为:
    view.jsp    将数据显示出来<%@ 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" %>
    <html>
    <body bgcolor="#ffffff">
    <logic:iterate id="element" name="gblist" scope="request">
    <bean:write name="element" property="USERNAME" />
    </logic:iterate></body>
    </html>