Struts2遇到了一个问题,解决不了了,希望各位帮帮忙
发生了一个错误,但是我却吧知道应该怎么办,求解
Action文件
public String selTem() {
String cnt;
String T_Telephone=temporary.getT_Telephone();
TemporaryDao td = new TemporaryDao();
td.setNowpage(nowpage);
list = td.selTem(T_Telephone);
nowpage = td.getNowpage();
allpage = td.getAllpage();
if (list!=null) {
cnt="selTem_1";
}else {
cnt="selTem_0";
selTem_0_msg="没有此用户,请确认您所输入的姓名和电话后查询,谢谢~!";
}
return cnt;
}
jsp文件<s:if test="list!=null && list.size()>0">
<input type="hidden" name="nowpage" value="1" />
<table width="500" cellpadding="5" cellspacing="0" align="center">
<tr>
<td>
姓名
</td>
<td>
<a href="TM/ShowSel.jsp">性别</a>
</td>
<td>
电话
</td>
<td>
身份证号
</td>
<td>
每周空闲时间
</td>
<td>
当前执行项目编号
</td>
<td>
当前执行项目名称
</td>
</tr>
<s:iterator var="l" value="list">
<tr>
<td>
${l.T_Name}
</td>
<td>
${l.T_Sex}
</td>
<td>
${l.T_Telephone}
</td>
<td>
${l.T_Id_Card}
</td>
<td>
${l.T_N_C_P_Id}
</td>
<td>
${l.T_N_C_P_Name}
</td>
</tr>
</s:iterator>
</table>
<p align="center"> 当前页:<s:property value="nowpage"/> 总页数:<s:property value="allpage"/>
<s:if test="%{nowpage>1}"><a href="javascript:f_page(<s:property value="nowpage"/> - 1)"> 上一页 </a> </s:if>
<s:if test="%{nowpage<=1}"> 上一页 </s:if>
<s:if test="%{nowpage>=allpage}">下一页</s:if>
<s:if test="%{nowpage<allpage}"><a href="javascript:f_page(<s:property value="nowpage"/> + 1)"> 下一页</a> </s:if></p>
</s:if>
javaDao文件public List selTem(String T_Telephone){
Temporary te=null;
List list = new ArrayList();
conn=DBUtil.getConnection();
String sql = "select * from Temporary where T_Telephone=? and T_OS='1'";
try {
ps=conn.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
ps.setString(1, T_Telephone);
rs=ps.executeQuery();
rs.last();
int num = rs.getRow();
this.allpage = (num+this.page-1)/this.page;
rs.beforeFirst();
for(int i=0;i<(this.nowpage-1)*this.page;i++)
{
rs.next();
}
for(int i=0;i<this.page;i++)
{
if (rs.next()) {
te=new Temporary(rs.getDate("T_E_Time"), rs.getString("T_P_Propert