打错了 是redeemVector.elementAt(i)
没有显示出问题 但是就是不输出查询结果
我就是想确认下 vector的用法是否正确
package floatingpopulation.tags;
import java.util.Vector;
import javax.servlet.http.HttpSession;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;
public final class DisplayRedeemTag extends TagSupport{
public int doEndTag() throws JspException
{
JspWriter out = pageContext.getOut();
HttpSession session = pageContext.getSession();
try
{
Vector redeemVector=(Vector)session.getAttribute("redeemVector");
out.println("<table>");
out.println("<tr>");
out.println("<td><b>身份证</b></td>");
out.println("<td><b>姓名<b></td>");
out.println("<td><b>性别</b></td>");
out.println("<td><b>民族</b></th>");
out.println("<td><b>出生日期</b></th>");
out.println("<td><b>婚姻状况</b></th>");
out.println("<td><b>职业</b></th>");
out.println("<td><b>亲属联系方式</b></tddd>");
out.println("<td><b>来自省份</b></td>");
out.println("<td><b>简历</b></td>");
out.println("</tr>");
out.println("<tr>");
for(int i=0;i<redeemVector.size();i++)
{
out.println("<td>"+ redeemVector.elementAt(i)+ "</td>");
}
out.println("</table>");
}catch (Exception ex)
{
}
return super.doEndTag();
}
}