zhai_lw 6 years ago
parent f753c9a1f4
commit 7420a3362a

@ -1,4 +1,4 @@
package servlet.select;
package servlet;
import core.process.C_StudentSearchTeacher;
import core.process.C_StudentSelectTeacher;
@ -13,7 +13,7 @@ public class S_StudentSelectTeacher extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
super.doPost(request, response);
String student_id=request.getParameter("id");
User user=(User)request.getSession().getAttribute("User");
User user=(User)request.getSession().getAttribute("user");
String teacher_id=user.getId();
try {
new C_StudentSelectTeacher().select(student_id,teacher_id);

@ -1,4 +1,4 @@
package servlet.select;
package servlet;
import core.process.C_TeacherSelectStudent;
import core.user.User;
@ -13,7 +13,7 @@ public class S_TeacherSelectStudent extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
super.doPost(request, response);
String teacher_id=request.getParameter("id");
User user=(User)request.getSession().getAttribute("User");
User user=(User)request.getSession().getAttribute("user");
String student_id=user.getId();
try {
new C_TeacherSelectStudent().select(teacher_id,student_id);

@ -1,19 +0,0 @@
package servlet.account;
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(name = "S_TeacherSelectStudent")
public class S_TeacherSelectStudent extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}
}

@ -31,12 +31,7 @@ public class login extends HttpServlet {
} catch (Exception e) {
e.printStackTrace();
}
request.getSession().setAttribute("User",user);
request.getSession().setAttribute("user",user);
request.getRequestDispatcher("/home.jsp").forward(request,response);
}
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
}
}

@ -1,23 +0,0 @@
package servlet.account;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet( "/service")
public class service extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
System.out.print(request.getParameter("id"));
}
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
}
}
Loading…
Cancel
Save