learn02
This commit is contained in:
parent
5a27235897
commit
8170cb39ad
@ -2,10 +2,10 @@
|
||||
Created by IntelliJ IDEA.
|
||||
User: awinx
|
||||
Date: 2024/12/5
|
||||
Time: 下午1:31
|
||||
Time: <EFBFBD><EFBFBD><EFBFBD><EFBFBD>1:31
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>$Title$</title>
|
||||
|
||||
@ -11,7 +11,7 @@ import java.io.IOException;
|
||||
|
||||
@WebServlet("/UserLoginAction")
|
||||
public class UserLoginAction extends HttpServlet {
|
||||
protected void doPost(HttpServletRequest req, HttpServletResponse response) throws ServletException, IOException {
|
||||
protected void doPost(HttpServletRequest req, HttpServletResponse response) throws IOException {
|
||||
String path = req.getContextPath();
|
||||
if (req.getSession().getAttribute("user") != null){
|
||||
response.sendRedirect(path+"/home.jsp");
|
||||
@ -28,7 +28,7 @@ public class UserLoginAction extends HttpServlet {
|
||||
response.sendRedirect(path+"/login/login.jsp&loginflag=2");
|
||||
}
|
||||
}
|
||||
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
response.sendRedirect("error.jsp");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
Time: 上午12:17
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>主页</title>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
Time: 下午1:20
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>学生信息管理系统</title>
|
||||
|
||||
@ -35,10 +35,7 @@ function getCourses(){
|
||||
$(document).ready(getCourses);
|
||||
|
||||
function editCourse(i){
|
||||
$(".course-editor").load(path+"/course/course_edit.jsp", (response,status,xhr)=>{
|
||||
if (stauts === 403){
|
||||
window.location = path+"/login/login.jsp";
|
||||
}
|
||||
$(".course-editor").load(path+"/course/course_edit.jsp", ()=>{
|
||||
const form = document.querySelector('.course-edit');
|
||||
form.action = path+"/CourseEditAction";
|
||||
form.method = "POST";
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
Time: 下午11:58
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>登录</title>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user