如题:我的代码。求大牛给解决下package com.qs.action;import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;import org.apache.struts2.interceptor.RequestAware;
import org.apache.struts2.interceptor.SessionAware;import SessionFactory.Confs;
import SessionFactory.Parties;import com.opensymphony.xwork2.ActionSupport;
import com.qs.dao.DaoManager;public class proDail extends ActionSupport implements RequestAware ,SessionAware{

public String selectAll(){
DaoManager manager=new DaoManager();
HashMap<String,List> map=manager.getSelectAll();
List<Confs> confslist=map.get("confsList");
List<Parties> partieslist=map.get("partiesList");
request.put("confslist", confslist);
request.put("partieslist", partieslist);
return SUCCESS;
}

private Map<String, Object> request;   
private Map<String, Object> session;   

public void setRequest(Map<String, Object> request)
{
this.request = request;
}
public void setSession(Map<String, Object> session)
{
this.session = session;
}
}<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>*********</title>
     <style>
body {
font-size:13px;
}
h1 {
text-align: center;
font-family: 黑体;
font-size:19px;
font-weight: 600;
}
h1.caption{
font-family: 黑体;
font-size:15px;
font-weight: 600;
background-color: #ddd;
margin: 0px;
padding:5px;
border-left: solid 1px gray;
border-right: solid 1px gray;
border-top: solid 1px gray;

}
table.list {
width:100%;
border-collapse: collapse;

.list td, .list th {
border: solid 1px gray;
padding: 2px;
}
.list thead tr {
background-color: #eef;
}
.highlight {
background-color: #ffc;
}
a:ACTIVE, a:VISITED, a:LINK {
text-decoration: none;
color: blue
}
a:hover {
color:red;
}

tr.disable {
background-color: #ccc;
color : #888;
}
</style>


<script src="../scripts/jquery-1.3.1.js" type="text/javascript"></script>
  </head>
  
  <body>
  <div  id="confsinfo">
  <table class="list">
  <thead>   <tr>
   <th width="5%">序号</th>
   <th width="10%">名称</th>
<th width="10%">Code</th>
<th width="10%">名称</th>
<th width="10%">桥ID</th>
<th width="10%">开始</th>
<th width="10%">结束</th>
<th width="10%">会议ID</th>
<th width="5%">主会议ID</th>
<th width="10%">子会议编号</th>
   </tr>
</thead>
   <c:forEach items="${confslist}" var="confs">
  <tr>
  <td>${confs.id}</td>
  <td>${confs.bridgeName}</td>
  <td>${confs.billingCode}</td>
<td>${confs.name}</td>
<td>${confs.bridgeID}</td>
<td>${confs.beginTime}</td>
<td>${confs.endTime}</td>
<td>${confs.confID}</td>
<td>${confs.mainConfID}</td>
<td>${confs.subConfNumber}</td>

  </tr>
  </c:forEach>
   </table>
 </div>  
<br>  
  <div  id="partiesinfo">
  <table class="list">
  <thead>
   <tr>
   <th width="5%">confid</th>
   <th width="10%">PartyID</th>
   <th width="10%">PartyName</th>
<th width="10%">Phone</th>
<th width="10%">IsModerator</th>
<th width="10%">BridgeTime</th>
<th width="10%">IsDialoutedIDD</th>
<th width="10%">DialoutRoute</th>
   </tr>
</thead>
   <c:forEach items="${partieslist}" var="parties">
  <tr>
  <td>${parties.confid}</td>
  <td>${parties.partyID}</td>
<td>${parties.partyName}</td>
<td>${parties.phone}</td>
<td>${parties.isModerator}</td>
<td>${parties.bridgeTime}</td>
<td>${parties.isDialoutedIDD}</td>
<td>${parties.dialoutRoute}</td>
  </tr>
  </c:forEach>
   </table>
 </div> 
 
  </body>
</html>

解决方案 »

  1.   

    能否给个例子或者给出代码看看,我之前没有使用过ajax.
      

  2.   

    能否给个例子或者给出代码看看,我之前没有使用过ajax.
      

  3.   

    能不能详细说说,或者上代码,我之前没有使用过ajax.
      

  4.   

    jquery中的ajax写法:
    $.ajax( {
        type :"POST",                 
        url :"loginAction.action",   //路径
        data :"name="+username"    //参数
        success : function(data) {
            alert(data); //返回值
        }
    });
      

  5.   

    谢谢,请求Struts2中的方法怎么写,请求没有参数,只需要回调返回的List.是不是不能直接传List数据。还是需要转换为Json?能实现么