1:<%@include  file="header.jsp"%>
   2:<%@ page import="java.util.List" %>
   3:<%@ page import="java.util.Iterator" %>
   4:<p align="center"><font size="+1" color="navy">
   5:    <b><%=renderRequest.getPortletSession().getAttribute("title")%></b></font>
   6:</p>
   7:<table align="center" width="80%" border="0" cellspacing="0" cellpadding="0" >
   8:<thead>
   9:    <tr>  
  10:<%
  11://Show column headings here:
  12:String [] queryColumns =  (String [])renderRequest.getPortletSession().getAttribute("queryColumns");
  13:
  14:int tableCols = queryColumns.length;
  15://Display column headings:
  16:for(int i = 0; i < queryColumns.length;i++) {
  17:%>
  18:    <th><b><%=queryColumns[i]%></b></th>
  19:<%}%>
  20:    </tr>
  21:</thead>
  22:<tbody>
  23:<%
  24://Display the table data:
  25:List queryData =  (List)renderRequest.getPortletSession().getAttribute("queryData");
  26:%>
  27:    <tr>
  28:        <td colspan=<%=tableCols%>><hr color="navy"></td>
  29:    </tr>
  30:<%
  31:String colorTR = "#EEEEEE";
  32:Iterator it = queryData.iterator();
  33:it = queryData.iterator();
  34:while(it.hasNext()) { %>
  35:    <tr bgcolor="<%=colorTR%>">
  36:<% 
  37:   if(colorTR.equals("#EEEEEE")) {
  38:     colorTR = "#FFFFFF";
  39:   }else{
  40:    colorTR = "#EEEEEE";
  41:   }
  42:   String[] rec = (String[])it.next();
  43:   for(int i = 0; i < rec.length;i++) {
  44:%>
  45:    <td align="center"><%=rec[i]%></td>
  46:<%}%>
  47:    </tr>
  48:<%}%>
  49:    <tr>
  50:        <td colspan=<%=tableCols%>>
  51:            <hr color="navy">
  52:        </td>
  53:    </tr>
  54:</tbody>
  55:</table>