diff --git a/src/com/hellogithub/dao/UserDao.java b/src/com/hellogithub/dao/UserDao.java index 6eb7994..32bb820 100644 --- a/src/com/hellogithub/dao/UserDao.java +++ b/src/com/hellogithub/dao/UserDao.java @@ -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); diff --git a/src/com/hellogithub/servlet/UploadHandleServlet.java b/src/com/hellogithub/servlet/UploadHandleServlet.java index 02e5827..2808fc8 100644 --- a/src/com/hellogithub/servlet/UploadHandleServlet.java +++ b/src/com/hellogithub/servlet/UploadHandleServlet.java @@ -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);