修改
This commit is contained in:
@@ -63,7 +63,7 @@ public class UserDao {
|
||||
connection = JdbcUtils.getConnection();
|
||||
// sql语句写的操作 ----加上事务
|
||||
JdbcUtils.beginTransaction(connection); // 开启事务
|
||||
String insertSql = "INSERT INTO `user` (`userId`, `userName`, `userPassword`,`creatTime`,`isValid`) VALUES (null, ?, ?,?,1);";
|
||||
String insertSql = "INSERT INTO `user` (`userId`, `userName`, `userPassword`,`creatTime`,`isValid`,projectNum) VALUES (null, ?, ?,?,1,0);";
|
||||
preparedStatement = connection.prepareStatement(insertSql);
|
||||
preparedStatement.setString(1, userName);
|
||||
preparedStatement.setString(2, userPwd);
|
||||
|
@@ -37,9 +37,9 @@ public class UploadHandleServlet extends HttpServlet {
|
||||
|
||||
|
||||
//得到上传文件的保存目录,将上传的文件存放于WEB-INF目录下,不允许外界直接访问,保证上传文件的安全
|
||||
// String savePath = this.getServletContext().getRealPath(File.separator+"WEB-INF"+File.separator+"upload");
|
||||
String savePath = this.getServletContext().getRealPath(File.separator+"WEB-INF"+File.separator+"upload");
|
||||
|
||||
String savePath="E:\\Desktop\\out";
|
||||
// String savePath="E:\\Desktop\\out";
|
||||
//上传时生成的临时文件保存目录
|
||||
String tempPath = this.getServletContext().getRealPath(File.separator+"WEB-INF"+File.separator+"tmp");
|
||||
File tmpFile = new File(tempPath);
|
||||
|
Reference in New Issue
Block a user