完成teacherSearchStudent

wmj
zhai_lw 6 years ago
parent 57893051b8
commit 29de469afd

@ -1,4 +1,4 @@
package servlet.Submit;
package servlet;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

@ -1,4 +1,4 @@
package servlet.Select;
package servlet;
import core.process.C_StudentSearchTeacher;
import core.process.C_StudentSelectTeacher;
@ -9,7 +9,7 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@WebServlet("/studentselectteacher")
@WebServlet("/student-select-teacher")
public class S_StudentSelectTeacher extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
super.doPost(request, response);
@ -17,11 +17,13 @@ public class S_StudentSelectTeacher extends HttpServlet {
User user=(User)request.getSession().getAttribute("user");
String student_id=user.getId();
try {
C_StudentSelectTeacher test=new C_StudentSelectTeacher();
test.setTeacherId(teacher_id);
test.setStudentId(student_id);
C_StudentSelectTeacher SST=new C_StudentSelectTeacher();
SST.setTeacherId(teacher_id);
SST.setStudentId(student_id);
SST.select();
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect("/op_fail.jsp");
}
}
}

@ -1,4 +1,4 @@
package servlet.Submit;
package servlet;
import core.user.User;
@ -12,7 +12,7 @@ import javax.servlet.http.Part;
import java.io.IOException;
import java.util.UUID;
@WebServlet("/upload")
@WebServlet("/student-upload-opening-report")
@MultipartConfig
//学生id+文件
public class S_StudentUploadOpeningReport extends HttpServlet {

@ -1,4 +1,4 @@
package servlet.Select;
package servlet;
import core.process.C_TeacherSelectStudent;
import core.user.User;
@ -9,7 +9,7 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@WebServlet("/teacherselectstudent")
@WebServlet("/teacher-select-student")
public class S_TeacherSelectStudent extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
super.doPost(request, response);
@ -17,11 +17,13 @@ public class S_TeacherSelectStudent extends HttpServlet {
User user=(User)request.getSession().getAttribute("user");
String teacher_id=user.getId();
try {
C_TeacherSelectStudent test=new C_TeacherSelectStudent();
test.setTeacherId(teacher_id);
test.setStudentId(student_id);
C_TeacherSelectStudent TSS=new C_TeacherSelectStudent();
TSS.setTeacherId(teacher_id);
TSS.setStudentId(student_id);
TSS.select();
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect("/op_fail.jsp");
}
}
}

@ -1,15 +0,0 @@
package servlet.Submit;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
public class S_ScoreSubmit extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
super.doPost(request, response);
String score = request.getParameter("score");
}
}

@ -1,23 +0,0 @@
package servlet.Submit;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@WebServlet("/textsubmit")
public class S_TextSubmit extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
super.doPost(request, response);
String content=new String(request.getParameter("text").getBytes("ISO8859-1"),"UTF-8");
String score=request.getParameter("score");
try {
} catch (Exception e) {
e.printStackTrace();
}
}
}

@ -18,10 +18,10 @@ import error.GExcptSQL;
@WebServlet("/login")
public class S_Login extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
throws IOException {
String id=request.getParameter("id");
String password=request.getParameter("password");
User user = null;
User user;
try {
user = AccountManagement.login(id,password);
} catch (GExcptSQL | SQLException gExcptSQL) {

Loading…
Cancel
Save