<%
int Id=Integer.parseInt(rs.getString("id"));
out.print(Id);
%>
这段代码错了吗?
错误报告就是:Column index 2 is out of range.
int Id=Integer.parseInt(rs.getString("id"));
out.print(Id);
%>
这段代码错了吗?
错误报告就是:Column index 2 is out of range.
解决方案 »
- struts2拦截器问题,只能拦截上传文件大小,但是不能拦截文件类型
- spring IOC 原理
- spring+hibernate+dwr 出现error <no converter found for "org.hibernate.proxy.cgliblazyinitializer">
- 请教高手帮忙!!
- 求解一个弱智小问题 ~~~
- 急急~~~~~~~~~~~~~~
- 关于cxf建设rest服务器
- 2000下安装resin。在线等侯!!
- 关于tomcat的问题!
- 关于下载文件IE提示“为帮助保护您的安全,internet explorer 已经阻止从此站点下载文件到您的计算机”
- hibernate中session的管理问题
- 如何提高软件系统的性能?
String sql="SELECT path from image order by Id asc";
ResultSet rs=stmt.executeQuery(sql);
if(!rs.next()){
out.print("<img src='error.gif'");
}else{
while(rs.next()){
%>
<div id="imagediv" style="height:150px;width:200px;filter:progid:DXImageTransform.Microsoft.BasicImage(0);">
<IMG src="../uploadfile/<%=rs.getString("path")%>"width="600" border="0" align="middle" id="ye" style="zoom:1" title="点击查看下一张" onmousewheel="return bbimg(this)" onclick='this.src="1213165357671.gif"'></td></div>
</tr>
<%
int Id=Integer.parseInt(rs.getString("Id"));
out.print(Id);
%>
<tr>
<td height="25">
<input type="button" name="shangzhang" value="上一张" onclick="javascript:window.open('showimage.jsp?Id=<%=Id-1%>','_self')">
<input type="button" name="xiazhang" value="下一张" onclick="javascript:window.open('showimage.jsp?Id=<%=Id+1%>','_self')">
<input type="button" name="fanhui" value="返回图片列表" onclick="location.href='show_image.jsp'">
</td>
</tr>
</table>
<%
}
%>
<%
}
%>
这就是.
这里哪来的Id .............