81,092
社区成员
发帖
与我相关
我的任务
分享
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
PreparedStatement pstmt = null;
DataBaseConnection dbc = null;
dbc = new DataBaseConnection();
pstmt = dbc.getConnection().prepareStatement("select * from file");
ResultSet rs = pstmt.executeQuery();
while(rs.next())
{
String name=basePath+rs.getString("name");
%>
<li><a href="<%=name%>"><%=name %></a><br></li>
<%
}
rs.close();
pstmt.close();
dbc.close();
}
%>
<a href="D:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\JspSmartUpload\20090404205953296.rar">下载文件</a>