给evaluate.jsp添加注释

This commit is contained in:
zzh 2025-02-12 16:17:25 +08:00
parent b3790185e2
commit dd0e1573dc
4 changed files with 251 additions and 170 deletions

View File

@ -171,3 +171,85 @@
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
12-Feb-2025 15:54:05.792 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.服务器版本: Apache Tomcat/9.0.99
12-Feb-2025 15:54:05.796 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 服务器构建: Feb 4 2025 20:08:08 UTC
12-Feb-2025 15:54:05.796 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 服务器版本号: 9.0.99.0
12-Feb-2025 15:54:05.796 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 操作系统名称: Windows 11
12-Feb-2025 15:54:05.796 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.版本: 10.0
12-Feb-2025 15:54:05.796 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 架构: amd64
12-Feb-2025 15:54:05.796 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 环境变量: C:\Program Files\Java\jdk-11
12-Feb-2025 15:54:05.796 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java虚拟机版本: 11.0.24+7-LTS-271
12-Feb-2025 15:54:05.796 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.供应商: Oracle Corporation
12-Feb-2025 15:54:05.796 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: D:\Jetbrains\Coding\Idea\SchoolST
12-Feb-2025 15:54:05.796 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Program Files\Apache Software Foundation\apache-tomcat-9.0.99
12-Feb-2025 15:54:05.803 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: --add-opens=java.base/java.lang=ALL-UNNAMED
12-Feb-2025 15:54:05.803 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: --add-opens=java.base/java.io=ALL-UNNAMED
12-Feb-2025 15:54:05.803 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: --add-opens=java.base/java.util=ALL-UNNAMED
12-Feb-2025 15:54:05.803 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
12-Feb-2025 15:54:05.803 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
12-Feb-2025 15:54:05.803 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Dcatalina.home=C:\Program Files\Apache Software Foundation\apache-tomcat-9.0.99
12-Feb-2025 15:54:05.803 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Dcatalina.base=D:\Jetbrains\Coding\Idea\SchoolST
12-Feb-2025 15:54:05.803 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Djava.io.tmpdir=D:\Jetbrains\Coding\Idea\SchoolST\temp
12-Feb-2025 15:54:05.804 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Djava.util.logging.config.file=D:\Jetbrains\Coding\Idea\SchoolST\conf\logging.properties
12-Feb-2025 15:54:05.804 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
12-Feb-2025 15:54:05.804 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -javaagent:D:\Jetbrains\IntelliJ IDEA Ultimate\lib\idea_rt.jar=49327:D:\Jetbrains\IntelliJ IDEA Ultimate\bin
12-Feb-2025 15:54:05.804 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Dfile.encoding=UTF-8
12-Feb-2025 15:54:05.807 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent 使用APR版本[1.7.4]加载了基于APR的Apache Tomcat本机库[1.3.1]。
12-Feb-2025 15:54:05.807 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR功能IPv6[true]、sendfile[true]、accept filters[false]、random[true]、UDS [true]。
12-Feb-2025 15:54:05.807 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL配置useAprConnector[false]useOpenSSL[true]
12-Feb-2025 15:54:05.814 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL成功初始化 [OpenSSL 3.0.14 4 Jun 2024]
12-Feb-2025 15:54:06.084 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["http-nio-8080"]
12-Feb-2025 15:54:06.108 信息 [main] org.apache.catalina.startup.Catalina.load 服务器在[493]毫秒内初始化
12-Feb-2025 15:54:06.161 信息 [main] org.apache.catalina.core.StandardService.startInternal 正在启动服务[Catalina]
12-Feb-2025 15:54:06.162 信息 [main] org.apache.catalina.core.StandardEngine.startInternal 正在启动 Servlet 引擎:[Apache Tomcat/9.0.99]
12-Feb-2025 15:54:06.169 信息 [main] org.apache.catalina.startup.HostConfig.deployDescriptor 正在部署部署描述符[D:\Jetbrains\Coding\Idea\SchoolST\conf\Catalina\localhost\School-ST.xml]。
12-Feb-2025 15:54:06.223 警告 [main] org.apache.catalina.webresources.DirResourceSet.initInternal Disabled the global canonical file name cache to protect against CVE-2024-56337 when starting the WebResourceSet at [D:\Jetbrains\Coding\Idea\SchoolST\src\main\webapp] which is part of the web application [/School-ST]
12-Feb-2025 15:54:06.336 警告 [main] org.apache.tomcat.util.descriptor.web.WebXml.setVersion 未知版本字符串 [6.1]。将使用默认版本。
12-Feb-2025 15:54:06.790 信息 [main] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
12-Feb-2025 15:54:07.000 警告 [main] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom 使用[SHA1PRNG]创建会话ID生成的SecureRandom实例花费了[180]毫秒。
12-Feb-2025 15:54:07.014 信息 [main] org.apache.catalina.startup.HostConfig.deployDescriptor 部署描述符[D:\Jetbrains\Coding\Idea\SchoolST\conf\Catalina\localhost\School-ST.xml]的部署已在[845]ms内完成
12-Feb-2025 15:54:07.018 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["http-nio-8080"]
12-Feb-2025 15:54:07.193 信息 [main] org.apache.catalina.startup.Catalina.start [1084]毫秒后服务器启动
12-Feb-2025 16:00:09.051 信息 [Thread-1] org.apache.coyote.AbstractProtocol.pause 暂停ProtocolHandler["http-nio-8080"]
12-Feb-2025 16:00:09.217 信息 [Thread-1] org.apache.catalina.core.StandardService.stopInternal 正在停止服务[Catalina]
12-Feb-2025 16:00:09.234 信息 [Thread-1] org.apache.coyote.AbstractProtocol.stop 正在停止ProtocolHandler ["http-nio-8080"]
12-Feb-2025 16:00:09.242 信息 [Thread-1] org.apache.coyote.AbstractProtocol.destroy 正在销毁协议处理器 ["http-nio-8080"]
12-Feb-2025 16:09:21.958 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.服务器版本: Apache Tomcat/9.0.99
12-Feb-2025 16:09:21.962 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 服务器构建: Feb 4 2025 20:08:08 UTC
12-Feb-2025 16:09:21.963 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 服务器版本号: 9.0.99.0
12-Feb-2025 16:09:21.963 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 操作系统名称: Windows 11
12-Feb-2025 16:09:21.963 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.版本: 10.0
12-Feb-2025 16:09:21.963 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 架构: amd64
12-Feb-2025 16:09:21.963 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 环境变量: C:\Program Files\Java\jdk-11
12-Feb-2025 16:09:21.964 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java虚拟机版本: 11.0.24+7-LTS-271
12-Feb-2025 16:09:21.964 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.供应商: Oracle Corporation
12-Feb-2025 16:09:21.964 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: D:\Jetbrains\Coding\Idea\SchoolST
12-Feb-2025 16:09:21.964 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Program Files\Apache Software Foundation\apache-tomcat-9.0.99
12-Feb-2025 16:09:21.974 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: --add-opens=java.base/java.lang=ALL-UNNAMED
12-Feb-2025 16:09:21.974 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: --add-opens=java.base/java.io=ALL-UNNAMED
12-Feb-2025 16:09:21.975 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: --add-opens=java.base/java.util=ALL-UNNAMED
12-Feb-2025 16:09:21.975 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
12-Feb-2025 16:09:21.975 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
12-Feb-2025 16:09:21.975 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Dcatalina.home=C:\Program Files\Apache Software Foundation\apache-tomcat-9.0.99
12-Feb-2025 16:09:21.975 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Dcatalina.base=D:\Jetbrains\Coding\Idea\SchoolST
12-Feb-2025 16:09:21.975 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Djava.io.tmpdir=D:\Jetbrains\Coding\Idea\SchoolST\temp
12-Feb-2025 16:09:21.975 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Djava.util.logging.config.file=D:\Jetbrains\Coding\Idea\SchoolST\conf\logging.properties
12-Feb-2025 16:09:21.976 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
12-Feb-2025 16:09:21.976 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -javaagent:D:\Jetbrains\IntelliJ IDEA Ultimate\lib\idea_rt.jar=50763:D:\Jetbrains\IntelliJ IDEA Ultimate\bin
12-Feb-2025 16:09:21.976 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Dfile.encoding=UTF-8
12-Feb-2025 16:09:21.979 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent 使用APR版本[1.7.4]加载了基于APR的Apache Tomcat本机库[1.3.1]。
12-Feb-2025 16:09:21.979 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR功能IPv6[true]、sendfile[true]、accept filters[false]、random[true]、UDS [true]。
12-Feb-2025 16:09:21.981 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL配置useAprConnector[false]useOpenSSL[true]
12-Feb-2025 16:09:21.987 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL成功初始化 [OpenSSL 3.0.14 4 Jun 2024]
12-Feb-2025 16:09:22.291 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["http-nio-8080"]
12-Feb-2025 16:09:22.319 信息 [main] org.apache.catalina.startup.Catalina.load 服务器在[565]毫秒内初始化
12-Feb-2025 16:09:22.363 信息 [main] org.apache.catalina.core.StandardService.startInternal 正在启动服务[Catalina]
12-Feb-2025 16:09:22.363 信息 [main] org.apache.catalina.core.StandardEngine.startInternal 正在启动 Servlet 引擎:[Apache Tomcat/9.0.99]
12-Feb-2025 16:09:22.371 信息 [main] org.apache.catalina.startup.HostConfig.deployDescriptor 正在部署部署描述符[D:\Jetbrains\Coding\Idea\SchoolST\conf\Catalina\localhost\School-ST.xml]。
12-Feb-2025 16:09:22.412 警告 [main] org.apache.catalina.webresources.DirResourceSet.initInternal Disabled the global canonical file name cache to protect against CVE-2024-56337 when starting the WebResourceSet at [D:\Jetbrains\Coding\Idea\SchoolST\src\main\webapp] which is part of the web application [/School-ST]
12-Feb-2025 16:09:22.478 警告 [main] org.apache.tomcat.util.descriptor.web.WebXml.setVersion 未知版本字符串 [6.1]。将使用默认版本。
12-Feb-2025 16:09:22.819 信息 [main] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
12-Feb-2025 16:09:23.006 警告 [main] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom 使用[SHA1PRNG]创建会话ID生成的SecureRandom实例花费了[160]毫秒。
12-Feb-2025 16:09:23.026 信息 [main] org.apache.catalina.startup.HostConfig.deployDescriptor 部署描述符[D:\Jetbrains\Coding\Idea\SchoolST\conf\Catalina\localhost\School-ST.xml]的部署已在[655]ms内完成
12-Feb-2025 16:09:23.031 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["http-nio-8080"]
12-Feb-2025 16:09:23.211 信息 [main] org.apache.catalina.startup.Catalina.start [891]毫秒后服务器启动

View File

@ -6,125 +6,125 @@
<style>
/* 全局样式 */
body {
font-family: Arial, sans-serif;
background-color: #f0f2f5;
margin: 0;
padding: 20px;
font-family: Arial, sans-serif; /* 设置字体 */
background-color: #f0f2f5; /* 设置背景颜色 */
margin: 0; /* 移除默认外边距 */
padding: 20px; /* 设置内边距 */
}
h1 {
text-align: center;
color: #2c3e50;
text-align: center; /* 标题居中 */
color: #2c3e50; /* 标题颜色 */
}
.container {
max-width: 800px;
margin: 0 auto;
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
text-align: center;
max-width: 800px; /* 设置容器最大宽度 */
margin: 0 auto; /* 居中对齐 */
background: white; /* 背景颜色 */
padding: 20px; /* 内边距 */
border-radius: 10px; /* 圆角 */
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影 */
text-align: center; /* 文本居中对齐 */
}
/* 表单样式 */
.form-group {
margin-bottom: 15px;
text-align: left;
margin-bottom: 15px; /* 表单组之间的间距 */
text-align: center; /* 表单组内容居中对齐 */
}
form {
display: flex;
flex-direction: column;
gap: 15px;
align-items: center;
display: flex; /* 使用弹性布局 */
flex-direction: column; /* 垂直排列 */
gap: 15px; /* 表单元素间距 */
align-items: center; /* 垂直居中对齐 */
}
label {
font-weight: bold;
color: #34495e;
margin-bottom: 5px;
font-weight: bold; /* 加粗标签文本 */
color: #34495e; /* 标签颜色 */
margin-bottom: 5px; /* 标签与下拉框之间的间距 */
}
select {
padding: 8px;
border: 1px solid #bdc3c7;
border-radius: 4px;
outline: none;
appearance: none;
background-color: white;
background-image: url('https://cdn.jsdelivr.net/gh/a854451261/cdn/icon/select-arrow.svg');
background-repeat: no-repeat;
background-position: right 8px center;
background-size: 12px 8px;
text-align: center;
cursor: pointer;
width: calc(100% - 16px);
padding: 8px; /* 内边距 */
border: 1px solid #bdc3c7; /* 边框样式 */
border-radius: 4px; /* 圆角 */
outline: none; /* 取消默认焦点样式 */
appearance: none; /* 取消默认箭头样式 */
background-color: white; /* 背景颜色 */
background-image: url('<url id="cum5gspic4u9hucljb80" type="url" status="failed" title="" wc="0">https://cdn.jsdelivr.net/gh/a854451261/cdn/icon/select-arrow.svg</url> '); /* 自定义箭头样式 */
background-repeat: no-repeat; /* 背景图片不重复 */
background-position: right 8px center; /* 背景图片位置 */
background-size: 12px 8px; /* 背景图片大小 */
text-align: center; /* 文本居中对齐 */
cursor: pointer; /* 鼠标悬停时显示手指图标 */
width: calc(100% - 16px); /* 宽度自适应 */
}
button {
background: linear-gradient(#3498db, #2980b9);
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background 0.3s;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
background: linear-gradient(#3498db, #2980b9); /* 按钮渐变背景 */
color: white; /* 文本颜色 */
padding: 10px 20px; /* 内边距 */
border: none; /* 移除边框 */
border-radius: 5px; /* 圆角 */
cursor: pointer; /* 鼠标悬停时显示手指图标 */
transition: background 0.3s; /* 背景过渡效果 */
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影 */
}
button:hover {
background: linear-gradient(#2980b9, #3498db);
background: linear-gradient(#2980b9, #3498db); /* 鼠标悬停时的渐变背景 */
}
/* 提示语 */
.hint {
color: #7f8c8d;
font-size: 0.9em;
margin-top: 10px;
color: #7f8c8d; /* 提示文本颜色 */
font-size: 0.9em; /* 字体大小 */
margin-top: 10px; /* 提示与表单之间的间距 */
}
</style>
<script>
// 动态加载老师和课程
function loadTeachers(college) {
const teachersSelect = document.getElementById("teacher");
const courseSelect = document.getElementById("course");
const teachersSelect = document.getElementById("teacher"); // 获取老师下拉框
const courseSelect = document.getElementById("course"); // 获取课程下拉框
if (college) {
fetch(`loadTeachers.jsp?college=${college}`)
.then(response => response.json())
fetch(`loadTeachers.jsp?college=${college}`) // 请求加载老师数据
.then(response => response.json()) // 解析JSON数据
.then(data => {
populateSelect(teachersSelect, data, "--请选择老师--");
populateSelect(teachersSelect, data, "--请选择老师--"); // 填充老师数据
})
.catch(error => {
console.error("加载老师失败:", error);
console.error("加载老师失败:", error); // 捕获错误
});
} else {
teachersSelect.innerHTML = "<option value=''>--请选择老师--</option>";
courseSelect.innerHTML = "<option value=''>--请选择课程--</option>";
teachersSelect.innerHTML = "<option value=''>--请选择老师--</option>"; // 清空老师下拉框
courseSelect.innerHTML = "<option value=''>--请选择课程--</option>"; // 清空课程下拉框
}
}
function loadCourses(teacher) {
const courseSelect = document.getElementById("course");
const courseSelect = document.getElementById("course"); // 获取课程下拉框
if (teacher) {
fetch(`loadCourses.jsp?teacher=${teacher}`)
.then(response => response.json())
fetch(`loadCourses.jsp?teacher=${teacher}`) // 请求加载课程数据
.then(response => response.json()) // 解析JSON数据
.then(data => {
populateSelect(courseSelect, data, "--请选择课程--");
populateSelect(courseSelect, data, "--请选择课程--"); // 填充课程数据
})
.catch(error => {
console.error("加载课程失败:", error);
console.error("加载课程失败:", error); // 捕获错误
});
} else {
courseSelect.innerHTML = "<option value=''>--请选择课程--</option>";
courseSelect.innerHTML = "<option value=''>--请选择课程--</option>"; // 清空课程下拉框
}
}
function populateSelect(selectElement, data, placeholder) {
selectElement.innerHTML = "";
const defaultOption = document.createElement("option");
defaultOption.value = "";
defaultOption.text = placeholder;
selectElement.appendChild(defaultOption);
selectElement.innerHTML = ""; // 清空下拉框
const defaultOption = document.createElement("option"); // 创建默认选项
defaultOption.value = ""; // 默认选项值
defaultOption.text = placeholder; // 默认选项文本
selectElement.appendChild(defaultOption); // 添加默认选项
data.forEach(item => {
data.forEach(item => { // 遍历并填充数据
const option = document.createElement("option");
option.value = item.value || item.course_id;
option.text = item.text || item.course_name;
selectElement.appendChild(option);
option.value = item.value || item.course_id; // 设置选项值
option.text = item.text || item.course_name; // 设置选项文本
selectElement.appendChild(option); // 添加选项
});
}
</script>
@ -134,30 +134,29 @@
<h1>学生评教系统</h1>
<form id="evaluationForm" action="evaluationPage.jsp" method="get">
<div class="form-group">
<label for="college">选择学院:</label>
<select id="college" name="college" onchange="loadTeachers(this.value)">
<option value="">--请选择学院--</option>
<option value="信息工程学院">信息工程学院</option>
<option value="智能工学院">智能工学院</option>
<option value="物理学院">物理学院</option>
<label for="college">选择学院:</label> <!-- 学院标签 -->
<select id="college" name="college" onchange="loadTeachers(this.value)"> <!-- 学院下拉框 -->
<option value="">--请选择学院--</option> <!-- 默认选项 -->
<option value="信息工程学院">信息工程学院</option> <!-- 学院选项 -->
<option value="智能工学院">智能工学院</option> <!-- 学院选项 -->
<option value="物理学院">物理学院</option> <!-- 学院选项 -->
</select>
</div>
<div class="form-group">
<label for="teacher">选择老师:</label>
<select id="teacher" name="teacher" onchange="loadCourses(this.value)">
<option value="">--请选择老师--</option>
<label for="teacher">选择老师:</label> <!-- 老师标签 -->
<select id="teacher" name="teacher" onchange="loadCourses(this.value)"> <!-- 老师下拉框 -->
<option value="">--请选择老师--</option> <!-- 默认选项 -->
</select>
</div>
<div class="form-group">
<label for="course">选择课程:</label>
<select id="course" name="course">
<option value="">--请选择课程--</option>
<label for="course">选择课程:</label> <!-- 课程标签 -->
<select id="course" name="course"> <!-- 课程下拉框 -->
<option value="">--请选择课程--</option> <!-- 默认选项 -->
</select>
</div>
<button type="submit">进入评教页面</button>
<button type="submit">进入评教页面</button> <!-- 提交按钮 -->
</form>
<div class="hint">请选择学院、老师以及课程,然后进入评教页面。</div>
<div class="hint">请选择学院、老师以及课程,然后进入评教页面。</div> <!-- 提示语 -->
</div>
<div id="hint">你是大帅比</div>
</body>
</html>

View File

@ -1,7 +1,7 @@
/*
* Generated by the Jasper component of Apache Tomcat
* Version: Apache Tomcat/9.0.99
* Generated at: 2025-02-12 07:54:21 UTC
* Generated at: 2025-02-12 08:16:08 UTC
* Note: The last modified time of this file was set to
* the last modified time of the source file after
* generation to assist with modification tracking.
@ -121,129 +121,129 @@ public final class evaluate_jsp extends org.apache.jasper.runtime.HttpJspBase
out.write(" <style>\r\n");
out.write(" /* 全局样式 */\r\n");
out.write(" body {\r\n");
out.write(" font-family: Arial, sans-serif;\r\n");
out.write(" background-color: #f0f2f5;\r\n");
out.write(" margin: 0;\r\n");
out.write(" padding: 20px;\r\n");
out.write(" font-family: Arial, sans-serif; /* 设置字体 */\r\n");
out.write(" background-color: #f0f2f5; /* 设置背景颜色 */\r\n");
out.write(" margin: 0; /* 移除默认外边距 */\r\n");
out.write(" padding: 20px; /* 设置内边距 */\r\n");
out.write(" }\r\n");
out.write(" h1 {\r\n");
out.write(" text-align: center;\r\n");
out.write(" color: #2c3e50;\r\n");
out.write(" text-align: center; /* 标题居中 */\r\n");
out.write(" color: #2c3e50; /* 标题颜色 */\r\n");
out.write(" }\r\n");
out.write(" .container {\r\n");
out.write(" max-width: 800px;\r\n");
out.write(" margin: 0 auto;\r\n");
out.write(" background: white;\r\n");
out.write(" padding: 20px;\r\n");
out.write(" border-radius: 10px;\r\n");
out.write(" box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\r\n");
out.write(" text-align: center;\r\n");
out.write(" max-width: 800px; /* 设置容器最大宽度 */\r\n");
out.write(" margin: 0 auto; /* 居中对齐 */\r\n");
out.write(" background: white; /* 背景颜色 */\r\n");
out.write(" padding: 20px; /* 内边距 */\r\n");
out.write(" border-radius: 10px; /* 圆角 */\r\n");
out.write(" box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影 */\r\n");
out.write(" text-align: center; /* 文本居中对齐 */\r\n");
out.write(" }\r\n");
out.write(" /* 表单样式 */\r\n");
out.write(" .form-group {\r\n");
out.write(" margin-bottom: 15px;\r\n");
out.write(" text-align: left;\r\n");
out.write(" margin-bottom: 15px; /* 表单组之间的间距 */\r\n");
out.write(" text-align: center; /* 表单组内容居中对齐 */\r\n");
out.write(" }\r\n");
out.write(" form {\r\n");
out.write(" display: flex;\r\n");
out.write(" flex-direction: column;\r\n");
out.write(" gap: 15px;\r\n");
out.write(" align-items: center;\r\n");
out.write(" display: flex; /* 使用弹性布局 */\r\n");
out.write(" flex-direction: column; /* 垂直排列 */\r\n");
out.write(" gap: 15px; /* 表单元素间距 */\r\n");
out.write(" align-items: center; /* 垂直居中对齐 */\r\n");
out.write(" }\r\n");
out.write(" label {\r\n");
out.write(" font-weight: bold;\r\n");
out.write(" color: #34495e;\r\n");
out.write(" margin-bottom: 5px;\r\n");
out.write(" font-weight: bold; /* 加粗标签文本 */\r\n");
out.write(" color: #34495e; /* 标签颜色 */\r\n");
out.write(" margin-bottom: 5px; /* 标签与下拉框之间的间距 */\r\n");
out.write(" }\r\n");
out.write(" select {\r\n");
out.write(" padding: 8px;\r\n");
out.write(" border: 1px solid #bdc3c7;\r\n");
out.write(" border-radius: 4px;\r\n");
out.write(" outline: none;\r\n");
out.write(" appearance: none;\r\n");
out.write(" background-color: white;\r\n");
out.write(" background-image: url('https://cdn.jsdelivr.net/gh/a854451261/cdn/icon/select-arrow.svg');\r\n");
out.write(" background-repeat: no-repeat;\r\n");
out.write(" background-position: right 8px center;\r\n");
out.write(" background-size: 12px 8px;\r\n");
out.write(" text-align: center;\r\n");
out.write(" cursor: pointer;\r\n");
out.write(" width: calc(100% - 16px);\r\n");
out.write(" padding: 8px; /* 内边距 */\r\n");
out.write(" border: 1px solid #bdc3c7; /* 边框样式 */\r\n");
out.write(" border-radius: 4px; /* 圆角 */\r\n");
out.write(" outline: none; /* 取消默认焦点样式 */\r\n");
out.write(" appearance: none; /* 取消默认箭头样式 */\r\n");
out.write(" background-color: white; /* 背景颜色 */\r\n");
out.write(" background-image: url('<url id=\"cum5gspic4u9hucljb80\" type=\"url\" status=\"failed\" title=\"\" wc=\"0\">https://cdn.jsdelivr.net/gh/a854451261/cdn/icon/select-arrow.svg</url> '); /* 自定义箭头样式 */\r\n");
out.write(" background-repeat: no-repeat; /* 背景图片不重复 */\r\n");
out.write(" background-position: right 8px center; /* 背景图片位置 */\r\n");
out.write(" background-size: 12px 8px; /* 背景图片大小 */\r\n");
out.write(" text-align: center; /* 文本居中对齐 */\r\n");
out.write(" cursor: pointer; /* 鼠标悬停时显示手指图标 */\r\n");
out.write(" width: calc(100% - 16px); /* 宽度自适应 */\r\n");
out.write(" }\r\n");
out.write(" button {\r\n");
out.write(" background: linear-gradient(#3498db, #2980b9);\r\n");
out.write(" color: white;\r\n");
out.write(" padding: 10px 20px;\r\n");
out.write(" border: none;\r\n");
out.write(" border-radius: 5px;\r\n");
out.write(" cursor: pointer;\r\n");
out.write(" transition: background 0.3s;\r\n");
out.write(" box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\r\n");
out.write(" background: linear-gradient(#3498db, #2980b9); /* 按钮渐变背景 */\r\n");
out.write(" color: white; /* 文本颜色 */\r\n");
out.write(" padding: 10px 20px; /* 内边距 */\r\n");
out.write(" border: none; /* 移除边框 */\r\n");
out.write(" border-radius: 5px; /* 圆角 */\r\n");
out.write(" cursor: pointer; /* 鼠标悬停时显示手指图标 */\r\n");
out.write(" transition: background 0.3s; /* 背景过渡效果 */\r\n");
out.write(" box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影 */\r\n");
out.write(" }\r\n");
out.write(" button:hover {\r\n");
out.write(" background: linear-gradient(#2980b9, #3498db);\r\n");
out.write(" background: linear-gradient(#2980b9, #3498db); /* 鼠标悬停时的渐变背景 */\r\n");
out.write(" }\r\n");
out.write(" /* 提示语 */\r\n");
out.write(" .hint {\r\n");
out.write(" color: #7f8c8d;\r\n");
out.write(" font-size: 0.9em;\r\n");
out.write(" margin-top: 10px;\r\n");
out.write(" color: #7f8c8d; /* 提示文本颜色 */\r\n");
out.write(" font-size: 0.9em; /* 字体大小 */\r\n");
out.write(" margin-top: 10px; /* 提示与表单之间的间距 */\r\n");
out.write(" }\r\n");
out.write(" </style>\r\n");
out.write(" <script>\r\n");
out.write(" // 动态加载老师和课程\r\n");
out.write(" function loadTeachers(college) {\r\n");
out.write(" const teachersSelect = document.getElementById(\"teacher\");\r\n");
out.write(" const courseSelect = document.getElementById(\"course\");\r\n");
out.write(" const teachersSelect = document.getElementById(\"teacher\"); // 获取老师下拉框\r\n");
out.write(" const courseSelect = document.getElementById(\"course\"); // 获取课程下拉框\r\n");
out.write("\r\n");
out.write(" if (college) {\r\n");
out.write(" fetch(`loadTeachers.jsp?college=");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${college}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("`)\r\n");
out.write(" .then(response => response.json())\r\n");
out.write("`) // 请求加载老师数据\r\n");
out.write(" .then(response => response.json()) // 解析JSON数据\r\n");
out.write(" .then(data => {\r\n");
out.write(" populateSelect(teachersSelect, data, \"--请选择老师--\");\r\n");
out.write(" populateSelect(teachersSelect, data, \"--请选择老师--\"); // 填充老师数据\r\n");
out.write(" })\r\n");
out.write(" .catch(error => {\r\n");
out.write(" console.error(\"加载老师失败:\", error);\r\n");
out.write(" console.error(\"加载老师失败:\", error); // 捕获错误\r\n");
out.write(" });\r\n");
out.write(" } else {\r\n");
out.write(" teachersSelect.innerHTML = \"<option value=''>--请选择老师--</option>\";\r\n");
out.write(" courseSelect.innerHTML = \"<option value=''>--请选择课程--</option>\";\r\n");
out.write(" teachersSelect.innerHTML = \"<option value=''>--请选择老师--</option>\"; // 清空老师下拉框\r\n");
out.write(" courseSelect.innerHTML = \"<option value=''>--请选择课程--</option>\"; // 清空课程下拉框\r\n");
out.write(" }\r\n");
out.write(" }\r\n");
out.write("\r\n");
out.write(" function loadCourses(teacher) {\r\n");
out.write(" const courseSelect = document.getElementById(\"course\");\r\n");
out.write(" const courseSelect = document.getElementById(\"course\"); // 获取课程下拉框\r\n");
out.write("\r\n");
out.write(" if (teacher) {\r\n");
out.write(" fetch(`loadCourses.jsp?teacher=");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${teacher}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("`)\r\n");
out.write(" .then(response => response.json())\r\n");
out.write("`) // 请求加载课程数据\r\n");
out.write(" .then(response => response.json()) // 解析JSON数据\r\n");
out.write(" .then(data => {\r\n");
out.write(" populateSelect(courseSelect, data, \"--请选择课程--\");\r\n");
out.write(" populateSelect(courseSelect, data, \"--请选择课程--\"); // 填充课程数据\r\n");
out.write(" })\r\n");
out.write(" .catch(error => {\r\n");
out.write(" console.error(\"加载课程失败:\", error);\r\n");
out.write(" console.error(\"加载课程失败:\", error); // 捕获错误\r\n");
out.write(" });\r\n");
out.write(" } else {\r\n");
out.write(" courseSelect.innerHTML = \"<option value=''>--请选择课程--</option>\";\r\n");
out.write(" courseSelect.innerHTML = \"<option value=''>--请选择课程--</option>\"; // 清空课程下拉框\r\n");
out.write(" }\r\n");
out.write(" }\r\n");
out.write("\r\n");
out.write(" function populateSelect(selectElement, data, placeholder) {\r\n");
out.write(" selectElement.innerHTML = \"\";\r\n");
out.write(" const defaultOption = document.createElement(\"option\");\r\n");
out.write(" defaultOption.value = \"\";\r\n");
out.write(" defaultOption.text = placeholder;\r\n");
out.write(" selectElement.appendChild(defaultOption);\r\n");
out.write(" selectElement.innerHTML = \"\"; // 清空下拉框\r\n");
out.write(" const defaultOption = document.createElement(\"option\"); // 创建默认选项\r\n");
out.write(" defaultOption.value = \"\"; // 默认选项值\r\n");
out.write(" defaultOption.text = placeholder; // 默认选项文本\r\n");
out.write(" selectElement.appendChild(defaultOption); // 添加默认选项\r\n");
out.write("\r\n");
out.write(" data.forEach(item => {\r\n");
out.write(" data.forEach(item => { // 遍历并填充数据\r\n");
out.write(" const option = document.createElement(\"option\");\r\n");
out.write(" option.value = item.value || item.course_id;\r\n");
out.write(" option.text = item.text || item.course_name;\r\n");
out.write(" selectElement.appendChild(option);\r\n");
out.write(" option.value = item.value || item.course_id; // 设置选项值\r\n");
out.write(" option.text = item.text || item.course_name; // 设置选项文本\r\n");
out.write(" selectElement.appendChild(option); // 添加选项\r\n");
out.write(" });\r\n");
out.write(" }\r\n");
out.write(" </script>\r\n");
@ -253,29 +253,29 @@ public final class evaluate_jsp extends org.apache.jasper.runtime.HttpJspBase
out.write(" <h1>学生评教系统</h1>\r\n");
out.write(" <form id=\"evaluationForm\" action=\"evaluationPage.jsp\" method=\"get\">\r\n");
out.write(" <div class=\"form-group\">\r\n");
out.write(" <label for=\"college\">选择学院:</label>\r\n");
out.write(" <select id=\"college\" name=\"college\" onchange=\"loadTeachers(this.value)\">\r\n");
out.write(" <option value=\"\">--请选择学院--</option>\r\n");
out.write(" <option value=\"信息工程学院\">信息工程学院</option>\r\n");
out.write(" <option value=\"智能工学院\">智能工学院</option>\r\n");
out.write(" <option value=\"物理学院\">物理学院</option>\r\n");
out.write(" <label for=\"college\">选择学院:</label> <!-- 学院标签 -->\r\n");
out.write(" <select id=\"college\" name=\"college\" onchange=\"loadTeachers(this.value)\"> <!-- 学院下拉框 -->\r\n");
out.write(" <option value=\"\">--请选择学院--</option> <!-- 默认选项 -->\r\n");
out.write(" <option value=\"信息工程学院\">信息工程学院</option> <!-- 学院选项 -->\r\n");
out.write(" <option value=\"智能工学院\">智能工学院</option> <!-- 学院选项 -->\r\n");
out.write(" <option value=\"物理学院\">物理学院</option> <!-- 学院选项 -->\r\n");
out.write(" </select>\r\n");
out.write(" </div>\r\n");
out.write(" <div class=\"form-group\">\r\n");
out.write(" <label for=\"teacher\">选择老师:</label>\r\n");
out.write(" <select id=\"teacher\" name=\"teacher\" onchange=\"loadCourses(this.value)\">\r\n");
out.write(" <option value=\"\">--请选择老师--</option>\r\n");
out.write(" <label for=\"teacher\">选择老师:</label> <!-- 老师标签 -->\r\n");
out.write(" <select id=\"teacher\" name=\"teacher\" onchange=\"loadCourses(this.value)\"> <!-- 老师下拉框 -->\r\n");
out.write(" <option value=\"\">--请选择老师--</option> <!-- 默认选项 -->\r\n");
out.write(" </select>\r\n");
out.write(" </div>\r\n");
out.write(" <div class=\"form-group\">\r\n");
out.write(" <label for=\"course\">选择课程:</label>\r\n");
out.write(" <select id=\"course\" name=\"course\">\r\n");
out.write(" <option value=\"\">--请选择课程--</option>\r\n");
out.write(" <label for=\"course\">选择课程:</label> <!-- 课程标签 -->\r\n");
out.write(" <select id=\"course\" name=\"course\"> <!-- 课程下拉框 -->\r\n");
out.write(" <option value=\"\">--请选择课程--</option> <!-- 默认选项 -->\r\n");
out.write(" </select>\r\n");
out.write(" </div>\r\n");
out.write(" <button type=\"submit\">进入评教页面</button>\r\n");
out.write(" <button type=\"submit\">进入评教页面</button> <!-- 提交按钮 -->\r\n");
out.write(" </form>\r\n");
out.write(" <div class=\"hint\">请选择学院、老师以及课程,然后进入评教页面。</div>\r\n");
out.write(" <div class=\"hint\">请选择学院、老师以及课程,然后进入评教页面。</div> <!-- 提示语 -->\r\n");
out.write("</div>\r\n");
out.write("</body>\r\n");
out.write("</html>");