修复论坛空白输入,上传文件未完成
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<%@ include file="/module/top.jsp"%>
|
||||
<div class="container">
|
||||
<%
|
||||
String counter = null;
|
||||
String counter = null;
|
||||
if (session.getAttribute("actualuser") == null) {
|
||||
out.println("<script>alert('登录超时 (1440 秒未活动)或未登录,请重新登录。');window.location.href='index.html';</script>");
|
||||
return;
|
||||
@@ -58,10 +58,10 @@
|
||||
String password = "";
|
||||
Class.forName(driverClass);
|
||||
try {
|
||||
ResultSet rs = null;
|
||||
Connection conn = null;
|
||||
PreparedStatement sql = null;
|
||||
|
||||
ResultSet rs = null;
|
||||
Connection conn = null;
|
||||
PreparedStatement sql = null;
|
||||
|
||||
conn = DriverManager.getConnection(url, user, password);
|
||||
Statement stmt = conn.createStatement();
|
||||
sql = conn.prepareStatement("select * from x2_resourse");
|
||||
@@ -72,16 +72,17 @@
|
||||
<td><%=rs.getString("resName")%></td>
|
||||
<td><%=rs.getString("size")%></td>
|
||||
<td><%=rs.getString("upLoadTime")%></td>
|
||||
<td><%=rs.getString("downLoadTimes")%></td>
|
||||
<td><a href="<%=rs.getString("link")%>"><button type="button"
|
||||
class="btn btn-success disabled" disabled="disabled">下载</button></a></td>
|
||||
<td><%=rs.getString("upLoaduser")%></td>
|
||||
<td><a href="<%=rs.getString("link")%>"><button
|
||||
type="button" class="btn btn-success disabled"
|
||||
disabled="disabled">下载</button></a></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
sql.close();
|
||||
rs.close();
|
||||
conn.close();
|
||||
stmt.close();
|
||||
sql.close();
|
||||
rs.close();
|
||||
conn.close();
|
||||
stmt.close();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -93,6 +94,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title text-center">上传文件</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<form
|
||||
action="${pageContext.request.contextPath}/servlet/UploadHandleServlet"
|
||||
enctype="multipart/form-data" method="post">
|
||||
<input type="text" name="username" value="<%=user1%>" /> <br />
|
||||
上传文件:<input type="file" name="file1"><br> <input
|
||||
class="btn btn-default" type="submit" value="提交">
|
||||
</form>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Footer -->
|
||||
|
||||
Reference in New Issue
Block a user