5
回答
应该是用是<s:iterator value="XXXXXX" var="X">来拿,但是不知道value具体该怎么写,请各位大侠指点
华为云实践训练营,热门技术免费实践!>>>   
<%@ page language="java"  pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>景区经纬度列表</title>
<style type="text/css">
<!--
.STYLE1 {font-size: 12px}
.STYLE3 {color: #707070; font-size: 12px; }
.STYLE5 {color: #0a6e0c; font-size: 12px; }
body {
 margin-top: 0px;
 margin-bottom: 0px;
}
.STYLE7 {font-size: 12}
-->
</style>
</head>

<body>
<s:form action="getGuideAreaByID">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<div class="STYLE1"><img src="images/main_14.gif"/> 您现在所在的位置:首页  → 景区经纬度列表</div>
 <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>&nbsp;</td>
        <td style="padding-right:10px;"><div align="right">
          <table border="0" align="right" cellpadding="0" cellspacing="0">
            <tr>
            
              <td width="60"><table width="90%" border="0" cellpadding="0" cellspacing="0">
                 
              </table></td>
             
            </tr>
          <table width="90%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td class="STYLE1"><div align="center"><img src="images/001.gif" width="14" height="14" /></div></td>
                    <td class="STYLE1"><div align="center"><a href="/guide/addmap.jsp">新增</a></div></td>
                  </tr>
                </table>

  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#c9c9c9">
      <tr>
        <td height="22" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">景点编号</span></strong></div></td>
        <td height="22" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">景点名称</span></strong></div></td>
        <td height="22" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">景点经度</span></strong></div></td>
        <td height="22" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">景点纬度</span></strong></div></td>
        <td height="22" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">景点类型</span></strong></div></td>
        <td height="22" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">操作</span></strong></div></td>
      </tr>
     <s:iterator value="guidearea" id="guideArea" status="st" >  
      <tr>
        <td height="22" bgcolor="#FFFFFF">
         <div align="center"><span class="STYLE3">
           <s:property value="#st.index+1"/></span></div></td>
          <s:url id="view" action="getGuideAreaByID.action">  
                  <s:param name="guideID">  
                  <s:property value="guideID" />
                  </s:param>
       </s:url>  
        <td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3"><s:a href="%{view}"><s:property value="communityTitle"/></s:a></span></div></td>
       
       
       
        <td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3"><s:property value="#guidearea.guideID"/></span></div></td>
  <td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3"><s:property value="#guidearea.name"/></span></div></td>
        <td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3"><s:property value="#guidearea.longitude"/></span></div></td>
        <td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3"><s:property value="#guidearea.latitude"/></span></div></td>
        <td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3"><s:property value="#guidearea.type"/></span></div></td>
        <td height="22" bgcolor="#FFFFFF">
         
         
        </td>
      </tr>
      </s:iterator>
    </table></td>
  </tr>
  <table>
   <tr>
    <td width="100%" valign="right" class="STYLE1">
    <div align="right">
      <s:property value="#request.pageBar" escape="false"/>
      </div>
    </td>
   </tr>
  </table>
</table>
</s:form>  
</body>
</html>

为什么取不出对象

举报
wpb王鹏博
发帖于6年前 5回/5K+阅
顶部