Compare commits
2 Commits
1ad04a2354
...
dd0e1573dc
Author | SHA1 | Date |
---|---|---|
|
dd0e1573dc | |
|
b3790185e2 |
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="23" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11 (2)" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -1,2 +1,2 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<Context docBase="F:\Coding\JetBrains\Idea\KTT\School-ST\src\main\webapp"/>
|
<Context docBase="D:\Jetbrains\Coding\Idea\SchoolST\src\main\webapp"/>
|
||||||
|
|
|
@ -171,3 +171,85 @@
|
||||||
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
|
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.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
|
||||||
at java.base/java.lang.Thread.run(Thread.java:829)
|
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]毫秒后服务器启动
|
||||||
|
|
|
@ -35,3 +35,7 @@
|
||||||
127.0.0.1 - - [12/Feb/2025:14:08:05 +0800] "GET /School-ST/evaluate.jsp HTTP/1.1" 200 5788
|
127.0.0.1 - - [12/Feb/2025:14:08:05 +0800] "GET /School-ST/evaluate.jsp HTTP/1.1" 200 5788
|
||||||
127.0.0.1 - - [12/Feb/2025:14:08:37 +0800] "GET /School-ST/admin.jsp HTTP/1.1" 200 1332
|
127.0.0.1 - - [12/Feb/2025:14:08:37 +0800] "GET /School-ST/admin.jsp HTTP/1.1" 200 1332
|
||||||
127.0.0.1 - - [12/Feb/2025:14:08:55 +0800] "GET /School-ST/admin.jsp HTTP/1.1" 200 1332
|
127.0.0.1 - - [12/Feb/2025:14:08:55 +0800] "GET /School-ST/admin.jsp HTTP/1.1" 200 1332
|
||||||
|
0:0:0:0:0:0:0:1 - - [12/Feb/2025:15:54:10 +0800] "GET /School-ST HTTP/1.1" 302 -
|
||||||
|
0:0:0:0:0:0:0:1 - - [12/Feb/2025:15:54:10 +0800] "GET /School-ST/ HTTP/1.1" 404 714
|
||||||
|
0:0:0:0:0:0:0:1 - - [12/Feb/2025:15:54:10 +0800] "GET /favicon.ico HTTP/1.1" 404 648
|
||||||
|
0:0:0:0:0:0:0:1 - - [12/Feb/2025:15:54:21 +0800] "GET /School-ST/evaluate.jsp HTTP/1.1" 200 5758
|
||||||
|
|
|
@ -6,125 +6,125 @@
|
||||||
<style>
|
<style>
|
||||||
/* 全局样式 */
|
/* 全局样式 */
|
||||||
body {
|
body {
|
||||||
font-family: Arial, sans-serif;
|
font-family: Arial, sans-serif; /* 设置字体 */
|
||||||
background-color: #f0f2f5;
|
background-color: #f0f2f5; /* 设置背景颜色 */
|
||||||
margin: 0;
|
margin: 0; /* 移除默认外边距 */
|
||||||
padding: 20px;
|
padding: 20px; /* 设置内边距 */
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
text-align: center;
|
text-align: center; /* 标题居中 */
|
||||||
color: #2c3e50;
|
color: #2c3e50; /* 标题颜色 */
|
||||||
}
|
}
|
||||||
.container {
|
.container {
|
||||||
max-width: 800px;
|
max-width: 800px; /* 设置容器最大宽度 */
|
||||||
margin: 0 auto;
|
margin: 0 auto; /* 居中对齐 */
|
||||||
background: white;
|
background: white; /* 背景颜色 */
|
||||||
padding: 20px;
|
padding: 20px; /* 内边距 */
|
||||||
border-radius: 10px;
|
border-radius: 10px; /* 圆角 */
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影 */
|
||||||
text-align: center;
|
text-align: center; /* 文本居中对齐 */
|
||||||
}
|
}
|
||||||
/* 表单样式 */
|
/* 表单样式 */
|
||||||
.form-group {
|
.form-group {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px; /* 表单组之间的间距 */
|
||||||
text-align: left;
|
text-align: center; /* 表单组内容居中对齐 */
|
||||||
}
|
}
|
||||||
form {
|
form {
|
||||||
display: flex;
|
display: flex; /* 使用弹性布局 */
|
||||||
flex-direction: column;
|
flex-direction: column; /* 垂直排列 */
|
||||||
gap: 15px;
|
gap: 15px; /* 表单元素间距 */
|
||||||
align-items: center;
|
align-items: center; /* 垂直居中对齐 */
|
||||||
}
|
}
|
||||||
label {
|
label {
|
||||||
font-weight: bold;
|
font-weight: bold; /* 加粗标签文本 */
|
||||||
color: #34495e;
|
color: #34495e; /* 标签颜色 */
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px; /* 标签与下拉框之间的间距 */
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
padding: 8px;
|
padding: 8px; /* 内边距 */
|
||||||
border: 1px solid #bdc3c7;
|
border: 1px solid #bdc3c7; /* 边框样式 */
|
||||||
border-radius: 4px;
|
border-radius: 4px; /* 圆角 */
|
||||||
outline: none;
|
outline: none; /* 取消默认焦点样式 */
|
||||||
appearance: none;
|
appearance: none; /* 取消默认箭头样式 */
|
||||||
background-color: white;
|
background-color: white; /* 背景颜色 */
|
||||||
background-image: url('https://cdn.jsdelivr.net/gh/a854451261/cdn/icon/select-arrow.svg');
|
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-repeat: no-repeat; /* 背景图片不重复 */
|
||||||
background-position: right 8px center;
|
background-position: right 8px center; /* 背景图片位置 */
|
||||||
background-size: 12px 8px;
|
background-size: 12px 8px; /* 背景图片大小 */
|
||||||
text-align: center;
|
text-align: center; /* 文本居中对齐 */
|
||||||
cursor: pointer;
|
cursor: pointer; /* 鼠标悬停时显示手指图标 */
|
||||||
width: calc(100% - 16px);
|
width: calc(100% - 16px); /* 宽度自适应 */
|
||||||
}
|
}
|
||||||
button {
|
button {
|
||||||
background: linear-gradient(#3498db, #2980b9);
|
background: linear-gradient(#3498db, #2980b9); /* 按钮渐变背景 */
|
||||||
color: white;
|
color: white; /* 文本颜色 */
|
||||||
padding: 10px 20px;
|
padding: 10px 20px; /* 内边距 */
|
||||||
border: none;
|
border: none; /* 移除边框 */
|
||||||
border-radius: 5px;
|
border-radius: 5px; /* 圆角 */
|
||||||
cursor: pointer;
|
cursor: pointer; /* 鼠标悬停时显示手指图标 */
|
||||||
transition: background 0.3s;
|
transition: background 0.3s; /* 背景过渡效果 */
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影 */
|
||||||
}
|
}
|
||||||
button:hover {
|
button:hover {
|
||||||
background: linear-gradient(#2980b9, #3498db);
|
background: linear-gradient(#2980b9, #3498db); /* 鼠标悬停时的渐变背景 */
|
||||||
}
|
}
|
||||||
/* 提示语 */
|
/* 提示语 */
|
||||||
.hint {
|
.hint {
|
||||||
color: #7f8c8d;
|
color: #7f8c8d; /* 提示文本颜色 */
|
||||||
font-size: 0.9em;
|
font-size: 0.9em; /* 字体大小 */
|
||||||
margin-top: 10px;
|
margin-top: 10px; /* 提示与表单之间的间距 */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
// 动态加载老师和课程
|
// 动态加载老师和课程
|
||||||
function loadTeachers(college) {
|
function loadTeachers(college) {
|
||||||
const teachersSelect = document.getElementById("teacher");
|
const teachersSelect = document.getElementById("teacher"); // 获取老师下拉框
|
||||||
const courseSelect = document.getElementById("course");
|
const courseSelect = document.getElementById("course"); // 获取课程下拉框
|
||||||
|
|
||||||
if (college) {
|
if (college) {
|
||||||
fetch(`loadTeachers.jsp?college=${college}`)
|
fetch(`loadTeachers.jsp?college=${college}`) // 请求加载老师数据
|
||||||
.then(response => response.json())
|
.then(response => response.json()) // 解析JSON数据
|
||||||
.then(data => {
|
.then(data => {
|
||||||
populateSelect(teachersSelect, data, "--请选择老师--");
|
populateSelect(teachersSelect, data, "--请选择老师--"); // 填充老师数据
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error("加载老师失败:", error);
|
console.error("加载老师失败:", error); // 捕获错误
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
teachersSelect.innerHTML = "<option value=''>--请选择老师--</option>";
|
teachersSelect.innerHTML = "<option value=''>--请选择老师--</option>"; // 清空老师下拉框
|
||||||
courseSelect.innerHTML = "<option value=''>--请选择课程--</option>";
|
courseSelect.innerHTML = "<option value=''>--请选择课程--</option>"; // 清空课程下拉框
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadCourses(teacher) {
|
function loadCourses(teacher) {
|
||||||
const courseSelect = document.getElementById("course");
|
const courseSelect = document.getElementById("course"); // 获取课程下拉框
|
||||||
|
|
||||||
if (teacher) {
|
if (teacher) {
|
||||||
fetch(`loadCourses.jsp?teacher=${teacher}`)
|
fetch(`loadCourses.jsp?teacher=${teacher}`) // 请求加载课程数据
|
||||||
.then(response => response.json())
|
.then(response => response.json()) // 解析JSON数据
|
||||||
.then(data => {
|
.then(data => {
|
||||||
populateSelect(courseSelect, data, "--请选择课程--");
|
populateSelect(courseSelect, data, "--请选择课程--"); // 填充课程数据
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error("加载课程失败:", error);
|
console.error("加载课程失败:", error); // 捕获错误
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
courseSelect.innerHTML = "<option value=''>--请选择课程--</option>";
|
courseSelect.innerHTML = "<option value=''>--请选择课程--</option>"; // 清空课程下拉框
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateSelect(selectElement, data, placeholder) {
|
function populateSelect(selectElement, data, placeholder) {
|
||||||
selectElement.innerHTML = "";
|
selectElement.innerHTML = ""; // 清空下拉框
|
||||||
const defaultOption = document.createElement("option");
|
const defaultOption = document.createElement("option"); // 创建默认选项
|
||||||
defaultOption.value = "";
|
defaultOption.value = ""; // 默认选项值
|
||||||
defaultOption.text = placeholder;
|
defaultOption.text = placeholder; // 默认选项文本
|
||||||
selectElement.appendChild(defaultOption);
|
selectElement.appendChild(defaultOption); // 添加默认选项
|
||||||
|
|
||||||
data.forEach(item => {
|
data.forEach(item => { // 遍历并填充数据
|
||||||
const option = document.createElement("option");
|
const option = document.createElement("option");
|
||||||
option.value = item.value || item.course_id;
|
option.value = item.value || item.course_id; // 设置选项值
|
||||||
option.text = item.text || item.course_name;
|
option.text = item.text || item.course_name; // 设置选项文本
|
||||||
selectElement.appendChild(option);
|
selectElement.appendChild(option); // 添加选项
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -134,29 +134,29 @@
|
||||||
<h1>学生评教系统</h1>
|
<h1>学生评教系统</h1>
|
||||||
<form id="evaluationForm" action="evaluationPage.jsp" method="get">
|
<form id="evaluationForm" action="evaluationPage.jsp" method="get">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="college">选择学院:</label>
|
<label for="college">选择学院:</label> <!-- 学院标签 -->
|
||||||
<select id="college" name="college" onchange="loadTeachers(this.value)">
|
<select id="college" name="college" onchange="loadTeachers(this.value)"> <!-- 学院下拉框 -->
|
||||||
<option value="">--请选择学院--</option>
|
<option value="">--请选择学院--</option> <!-- 默认选项 -->
|
||||||
<option value="信息工程学院">信息工程学院</option>
|
<option value="信息工程学院">信息工程学院</option> <!-- 学院选项 -->
|
||||||
<option value="智能工学院">智能工学院</option>
|
<option value="智能工学院">智能工学院</option> <!-- 学院选项 -->
|
||||||
<option value="物理学院">物理学院</option>
|
<option value="物理学院">物理学院</option> <!-- 学院选项 -->
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="teacher">选择老师:</label>
|
<label for="teacher">选择老师:</label> <!-- 老师标签 -->
|
||||||
<select id="teacher" name="teacher" onchange="loadCourses(this.value)">
|
<select id="teacher" name="teacher" onchange="loadCourses(this.value)"> <!-- 老师下拉框 -->
|
||||||
<option value="">--请选择老师--</option>
|
<option value="">--请选择老师--</option> <!-- 默认选项 -->
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="course">选择课程:</label>
|
<label for="course">选择课程:</label> <!-- 课程标签 -->
|
||||||
<select id="course" name="course">
|
<select id="course" name="course"> <!-- 课程下拉框 -->
|
||||||
<option value="">--请选择课程--</option>
|
<option value="">--请选择课程--</option> <!-- 默认选项 -->
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit">进入评教页面</button>
|
<button type="submit">进入评教页面</button> <!-- 提交按钮 -->
|
||||||
</form>
|
</form>
|
||||||
<div class="hint">请选择学院、老师以及课程,然后进入评教页面。</div>
|
<div class="hint">请选择学院、老师以及课程,然后进入评教页面。</div> <!-- 提示语 -->
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Binary file not shown.
|
@ -1,211 +0,0 @@
|
||||||
/*
|
|
||||||
* Generated by the Jasper component of Apache Tomcat
|
|
||||||
* Version: Apache Tomcat/9.0.98
|
|
||||||
* Generated at: 2025-02-12 06:08:37 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.
|
|
||||||
*/
|
|
||||||
package org.apache.jsp;
|
|
||||||
|
|
||||||
import javax.servlet.*;
|
|
||||||
import javax.servlet.http.*;
|
|
||||||
import javax.servlet.jsp.*;
|
|
||||||
import java.sql.*;
|
|
||||||
|
|
||||||
public final class admin_jsp extends org.apache.jasper.runtime.HttpJspBase
|
|
||||||
implements org.apache.jasper.runtime.JspSourceDependent,
|
|
||||||
org.apache.jasper.runtime.JspSourceImports {
|
|
||||||
|
|
||||||
private static final javax.servlet.jsp.JspFactory _jspxFactory =
|
|
||||||
javax.servlet.jsp.JspFactory.getDefaultFactory();
|
|
||||||
|
|
||||||
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
|
|
||||||
|
|
||||||
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
|
|
||||||
|
|
||||||
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
|
|
||||||
|
|
||||||
static {
|
|
||||||
_jspx_imports_packages = new java.util.LinkedHashSet<>(6);
|
|
||||||
_jspx_imports_packages.add("java.sql");
|
|
||||||
_jspx_imports_packages.add("javax.servlet");
|
|
||||||
_jspx_imports_packages.add("javax.servlet.http");
|
|
||||||
_jspx_imports_packages.add("javax.servlet.jsp");
|
|
||||||
_jspx_imports_classes = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private volatile javax.el.ExpressionFactory _el_expressionfactory;
|
|
||||||
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
|
|
||||||
|
|
||||||
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
|
|
||||||
return _jspx_dependants;
|
|
||||||
}
|
|
||||||
|
|
||||||
public java.util.Set<java.lang.String> getPackageImports() {
|
|
||||||
return _jspx_imports_packages;
|
|
||||||
}
|
|
||||||
|
|
||||||
public java.util.Set<java.lang.String> getClassImports() {
|
|
||||||
return _jspx_imports_classes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
|
|
||||||
if (_el_expressionfactory == null) {
|
|
||||||
synchronized (this) {
|
|
||||||
if (_el_expressionfactory == null) {
|
|
||||||
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _el_expressionfactory;
|
|
||||||
}
|
|
||||||
|
|
||||||
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
|
|
||||||
if (_jsp_instancemanager == null) {
|
|
||||||
synchronized (this) {
|
|
||||||
if (_jsp_instancemanager == null) {
|
|
||||||
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _jsp_instancemanager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void _jspInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public void _jspDestroy() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
|
|
||||||
throws java.io.IOException, javax.servlet.ServletException {
|
|
||||||
|
|
||||||
if (!javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
|
|
||||||
final java.lang.String _jspx_method = request.getMethod();
|
|
||||||
if ("OPTIONS".equals(_jspx_method)) {
|
|
||||||
response.setHeader("Allow","GET, HEAD, POST, OPTIONS");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method)) {
|
|
||||||
response.setHeader("Allow","GET, HEAD, POST, OPTIONS");
|
|
||||||
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSP 只允许 GET、POST 或 HEAD。Jasper 还允许 OPTIONS");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
final javax.servlet.jsp.PageContext pageContext;
|
|
||||||
javax.servlet.http.HttpSession session = null;
|
|
||||||
final javax.servlet.ServletContext application;
|
|
||||||
final javax.servlet.ServletConfig config;
|
|
||||||
javax.servlet.jsp.JspWriter out = null;
|
|
||||||
final java.lang.Object page = this;
|
|
||||||
javax.servlet.jsp.JspWriter _jspx_out = null;
|
|
||||||
javax.servlet.jsp.PageContext _jspx_page_context = null;
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
|
||||||
response.setContentType("text/html; charset=UTF-8");
|
|
||||||
pageContext = _jspxFactory.getPageContext(this, request, response,
|
|
||||||
null, true, 8192, true);
|
|
||||||
_jspx_page_context = pageContext;
|
|
||||||
application = pageContext.getServletContext();
|
|
||||||
config = pageContext.getServletConfig();
|
|
||||||
session = pageContext.getSession();
|
|
||||||
out = pageContext.getOut();
|
|
||||||
_jspx_out = out;
|
|
||||||
|
|
||||||
out.write("\r\n");
|
|
||||||
out.write("\r\n");
|
|
||||||
out.write("<!DOCTYPE html>\r\n");
|
|
||||||
out.write("<html>\r\n");
|
|
||||||
out.write("<head>\r\n");
|
|
||||||
out.write(" <title>管理员查看评教统计</title>\r\n");
|
|
||||||
out.write(" <style>\r\n");
|
|
||||||
out.write(" body {\r\n");
|
|
||||||
out.write(" font-family: Arial, sans-serif;\r\n");
|
|
||||||
out.write(" margin: 0;\r\n");
|
|
||||||
out.write(" padding: 0;\r\n");
|
|
||||||
out.write(" background-color: #f4f4f4;\r\n");
|
|
||||||
out.write(" }\r\n");
|
|
||||||
out.write(" .container {\r\n");
|
|
||||||
out.write(" width: 80%;\r\n");
|
|
||||||
out.write(" margin: 0 auto;\r\n");
|
|
||||||
out.write(" padding: 20px;\r\n");
|
|
||||||
out.write(" background-color: #fff;\r\n");
|
|
||||||
out.write(" border-radius: 8px;\r\n");
|
|
||||||
out.write(" box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);\r\n");
|
|
||||||
out.write(" }\r\n");
|
|
||||||
out.write(" h1 {\r\n");
|
|
||||||
out.write(" text-align: center;\r\n");
|
|
||||||
out.write(" color: #333;\r\n");
|
|
||||||
out.write(" }\r\n");
|
|
||||||
out.write(" table {\r\n");
|
|
||||||
out.write(" width: 100%;\r\n");
|
|
||||||
out.write(" border-collapse: collapse;\r\n");
|
|
||||||
out.write(" margin-top: 20px;\r\n");
|
|
||||||
out.write(" }\r\n");
|
|
||||||
out.write(" th, td {\r\n");
|
|
||||||
out.write(" padding: 12px;\r\n");
|
|
||||||
out.write(" text-align: left;\r\n");
|
|
||||||
out.write(" border-bottom: 1px solid #ddd;\r\n");
|
|
||||||
out.write(" }\r\n");
|
|
||||||
out.write(" th {\r\n");
|
|
||||||
out.write(" background-color: #4CAF50;\r\n");
|
|
||||||
out.write(" color: white;\r\n");
|
|
||||||
out.write(" }\r\n");
|
|
||||||
out.write(" tr:hover {\r\n");
|
|
||||||
out.write(" background-color: #f5f5f5;\r\n");
|
|
||||||
out.write(" }\r\n");
|
|
||||||
out.write(" </style>\r\n");
|
|
||||||
out.write("</head>\r\n");
|
|
||||||
out.write("<body>\r\n");
|
|
||||||
out.write("<div class=\"container\">\r\n");
|
|
||||||
out.write(" <h1>评教统计</h1>\r\n");
|
|
||||||
out.write(" <table>\r\n");
|
|
||||||
out.write(" <tr>\r\n");
|
|
||||||
out.write(" <th>老师姓名</th>\r\n");
|
|
||||||
out.write(" <th>平均得分</th>\r\n");
|
|
||||||
out.write(" </tr>\r\n");
|
|
||||||
out.write(" ");
|
|
||||||
|
|
||||||
try {
|
|
||||||
Class.forName("com.mysql.cj.jdbc.Driver");
|
|
||||||
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "SchoolST", "123456");
|
|
||||||
String sql = "SELECT t.name, AVG(e.total_score) as avg_score FROM teachers t JOIN evaluations e ON t.teacher_id = e.teacher_id GROUP BY t.teacher_id";
|
|
||||||
Statement stmt = conn.createStatement();
|
|
||||||
ResultSet rs = stmt.executeQuery(sql);
|
|
||||||
while (rs.next()) {
|
|
||||||
out.println("<tr><td>" + rs.getString("name") + "</td><td>" + rs.getDouble("avg_score") + "</td></tr>");
|
|
||||||
}
|
|
||||||
rs.close();
|
|
||||||
stmt.close();
|
|
||||||
conn.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
out.write("\r\n");
|
|
||||||
out.write(" </table>\r\n");
|
|
||||||
out.write("</div>\r\n");
|
|
||||||
out.write("</body>\r\n");
|
|
||||||
out.write("</html>");
|
|
||||||
} catch (java.lang.Throwable t) {
|
|
||||||
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
|
|
||||||
out = _jspx_out;
|
|
||||||
if (out != null && out.getBufferSize() != 0)
|
|
||||||
try {
|
|
||||||
if (response.isCommitted()) {
|
|
||||||
out.flush();
|
|
||||||
} else {
|
|
||||||
out.clearBuffer();
|
|
||||||
}
|
|
||||||
} catch (java.io.IOException e) {}
|
|
||||||
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
|
|
||||||
else throw new ServletException(t);
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
_jspxFactory.releasePageContext(_jspx_page_context);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Generated by the Jasper component of Apache Tomcat
|
* Generated by the Jasper component of Apache Tomcat
|
||||||
* Version: Apache Tomcat/9.0.98
|
* Version: Apache Tomcat/9.0.99
|
||||||
* Generated at: 2025-02-12 06:08:05 UTC
|
* Generated at: 2025-02-12 08:16:08 UTC
|
||||||
* Note: The last modified time of this file was set to
|
* Note: The last modified time of this file was set to
|
||||||
* the last modified time of the source file after
|
* the last modified time of the source file after
|
||||||
* generation to assist with modification tracking.
|
* 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(" <style>\r\n");
|
||||||
out.write(" /* 全局样式 */\r\n");
|
out.write(" /* 全局样式 */\r\n");
|
||||||
out.write(" body {\r\n");
|
out.write(" body {\r\n");
|
||||||
out.write(" font-family: Arial, sans-serif;\r\n");
|
out.write(" font-family: Arial, sans-serif; /* 设置字体 */\r\n");
|
||||||
out.write(" background-color: #f0f2f5;\r\n");
|
out.write(" background-color: #f0f2f5; /* 设置背景颜色 */\r\n");
|
||||||
out.write(" margin: 0;\r\n");
|
out.write(" margin: 0; /* 移除默认外边距 */\r\n");
|
||||||
out.write(" padding: 20px;\r\n");
|
out.write(" padding: 20px; /* 设置内边距 */\r\n");
|
||||||
out.write(" }\r\n");
|
out.write(" }\r\n");
|
||||||
out.write(" h1 {\r\n");
|
out.write(" h1 {\r\n");
|
||||||
out.write(" text-align: center;\r\n");
|
out.write(" text-align: center; /* 标题居中 */\r\n");
|
||||||
out.write(" color: #2c3e50;\r\n");
|
out.write(" color: #2c3e50; /* 标题颜色 */\r\n");
|
||||||
out.write(" }\r\n");
|
out.write(" }\r\n");
|
||||||
out.write(" .container {\r\n");
|
out.write(" .container {\r\n");
|
||||||
out.write(" max-width: 800px;\r\n");
|
out.write(" max-width: 800px; /* 设置容器最大宽度 */\r\n");
|
||||||
out.write(" margin: 0 auto;\r\n");
|
out.write(" margin: 0 auto; /* 居中对齐 */\r\n");
|
||||||
out.write(" background: white;\r\n");
|
out.write(" background: white; /* 背景颜色 */\r\n");
|
||||||
out.write(" padding: 20px;\r\n");
|
out.write(" padding: 20px; /* 内边距 */\r\n");
|
||||||
out.write(" border-radius: 10px;\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(" box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影 */\r\n");
|
||||||
out.write(" text-align: center;\r\n");
|
out.write(" text-align: center; /* 文本居中对齐 */\r\n");
|
||||||
out.write(" }\r\n");
|
out.write(" }\r\n");
|
||||||
out.write(" /* 表单样式 */\r\n");
|
out.write(" /* 表单样式 */\r\n");
|
||||||
out.write(" .form-group {\r\n");
|
out.write(" .form-group {\r\n");
|
||||||
out.write(" margin-bottom: 15px;\r\n");
|
out.write(" margin-bottom: 15px; /* 表单组之间的间距 */\r\n");
|
||||||
out.write(" text-align: left;\r\n");
|
out.write(" text-align: center; /* 表单组内容居中对齐 */\r\n");
|
||||||
out.write(" }\r\n");
|
out.write(" }\r\n");
|
||||||
out.write(" form {\r\n");
|
out.write(" form {\r\n");
|
||||||
out.write(" display: flex;\r\n");
|
out.write(" display: flex; /* 使用弹性布局 */\r\n");
|
||||||
out.write(" flex-direction: column;\r\n");
|
out.write(" flex-direction: column; /* 垂直排列 */\r\n");
|
||||||
out.write(" gap: 15px;\r\n");
|
out.write(" gap: 15px; /* 表单元素间距 */\r\n");
|
||||||
out.write(" align-items: center;\r\n");
|
out.write(" align-items: center; /* 垂直居中对齐 */\r\n");
|
||||||
out.write(" }\r\n");
|
out.write(" }\r\n");
|
||||||
out.write(" label {\r\n");
|
out.write(" label {\r\n");
|
||||||
out.write(" font-weight: bold;\r\n");
|
out.write(" font-weight: bold; /* 加粗标签文本 */\r\n");
|
||||||
out.write(" color: #34495e;\r\n");
|
out.write(" color: #34495e; /* 标签颜色 */\r\n");
|
||||||
out.write(" margin-bottom: 5px;\r\n");
|
out.write(" margin-bottom: 5px; /* 标签与下拉框之间的间距 */\r\n");
|
||||||
out.write(" }\r\n");
|
out.write(" }\r\n");
|
||||||
out.write(" select {\r\n");
|
out.write(" select {\r\n");
|
||||||
out.write(" padding: 8px;\r\n");
|
out.write(" padding: 8px; /* 内边距 */\r\n");
|
||||||
out.write(" border: 1px solid #bdc3c7;\r\n");
|
out.write(" border: 1px solid #bdc3c7; /* 边框样式 */\r\n");
|
||||||
out.write(" border-radius: 4px;\r\n");
|
out.write(" border-radius: 4px; /* 圆角 */\r\n");
|
||||||
out.write(" outline: none;\r\n");
|
out.write(" outline: none; /* 取消默认焦点样式 */\r\n");
|
||||||
out.write(" appearance: none;\r\n");
|
out.write(" appearance: none; /* 取消默认箭头样式 */\r\n");
|
||||||
out.write(" background-color: white;\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-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-repeat: no-repeat; /* 背景图片不重复 */\r\n");
|
||||||
out.write(" background-position: right 8px center;\r\n");
|
out.write(" background-position: right 8px center; /* 背景图片位置 */\r\n");
|
||||||
out.write(" background-size: 12px 8px;\r\n");
|
out.write(" background-size: 12px 8px; /* 背景图片大小 */\r\n");
|
||||||
out.write(" text-align: center;\r\n");
|
out.write(" text-align: center; /* 文本居中对齐 */\r\n");
|
||||||
out.write(" cursor: pointer;\r\n");
|
out.write(" cursor: pointer; /* 鼠标悬停时显示手指图标 */\r\n");
|
||||||
out.write(" width: calc(100% - 16px);\r\n");
|
out.write(" width: calc(100% - 16px); /* 宽度自适应 */\r\n");
|
||||||
out.write(" }\r\n");
|
out.write(" }\r\n");
|
||||||
out.write(" button {\r\n");
|
out.write(" button {\r\n");
|
||||||
out.write(" background: linear-gradient(#3498db, #2980b9);\r\n");
|
out.write(" background: linear-gradient(#3498db, #2980b9); /* 按钮渐变背景 */\r\n");
|
||||||
out.write(" color: white;\r\n");
|
out.write(" color: white; /* 文本颜色 */\r\n");
|
||||||
out.write(" padding: 10px 20px;\r\n");
|
out.write(" padding: 10px 20px; /* 内边距 */\r\n");
|
||||||
out.write(" border: none;\r\n");
|
out.write(" border: none; /* 移除边框 */\r\n");
|
||||||
out.write(" border-radius: 5px;\r\n");
|
out.write(" border-radius: 5px; /* 圆角 */\r\n");
|
||||||
out.write(" cursor: pointer;\r\n");
|
out.write(" cursor: pointer; /* 鼠标悬停时显示手指图标 */\r\n");
|
||||||
out.write(" transition: background 0.3s;\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(" box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影 */\r\n");
|
||||||
out.write(" }\r\n");
|
out.write(" }\r\n");
|
||||||
out.write(" button:hover {\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(" /* 提示语 */\r\n");
|
out.write(" /* 提示语 */\r\n");
|
||||||
out.write(" .hint {\r\n");
|
out.write(" .hint {\r\n");
|
||||||
out.write(" color: #7f8c8d;\r\n");
|
out.write(" color: #7f8c8d; /* 提示文本颜色 */\r\n");
|
||||||
out.write(" font-size: 0.9em;\r\n");
|
out.write(" font-size: 0.9em; /* 字体大小 */\r\n");
|
||||||
out.write(" margin-top: 10px;\r\n");
|
out.write(" margin-top: 10px; /* 提示与表单之间的间距 */\r\n");
|
||||||
out.write(" }\r\n");
|
out.write(" }\r\n");
|
||||||
out.write(" </style>\r\n");
|
out.write(" </style>\r\n");
|
||||||
out.write(" <script>\r\n");
|
out.write(" <script>\r\n");
|
||||||
out.write(" // 动态加载老师和课程\r\n");
|
out.write(" // 动态加载老师和课程\r\n");
|
||||||
out.write(" function loadTeachers(college) {\r\n");
|
out.write(" function loadTeachers(college) {\r\n");
|
||||||
out.write(" const teachersSelect = document.getElementById(\"teacher\");\r\n");
|
out.write(" const teachersSelect = document.getElementById(\"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("\r\n");
|
||||||
out.write(" if (college) {\r\n");
|
out.write(" if (college) {\r\n");
|
||||||
out.write(" fetch(`loadTeachers.jsp?college=");
|
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((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("`) // 请求加载老师数据\r\n");
|
||||||
out.write(" .then(response => response.json())\r\n");
|
out.write(" .then(response => response.json()) // 解析JSON数据\r\n");
|
||||||
out.write(" .then(data => {\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(" })\r\n");
|
||||||
out.write(" .catch(error => {\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(" });\r\n");
|
||||||
out.write(" } else {\r\n");
|
out.write(" } else {\r\n");
|
||||||
out.write(" teachersSelect.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(" courseSelect.innerHTML = \"<option value=''>--请选择课程--</option>\"; // 清空课程下拉框\r\n");
|
||||||
out.write(" }\r\n");
|
out.write(" }\r\n");
|
||||||
out.write(" }\r\n");
|
out.write(" }\r\n");
|
||||||
out.write("\r\n");
|
out.write("\r\n");
|
||||||
out.write(" function loadCourses(teacher) {\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("\r\n");
|
||||||
out.write(" if (teacher) {\r\n");
|
out.write(" if (teacher) {\r\n");
|
||||||
out.write(" fetch(`loadCourses.jsp?teacher=");
|
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((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("`) // 请求加载课程数据\r\n");
|
||||||
out.write(" .then(response => response.json())\r\n");
|
out.write(" .then(response => response.json()) // 解析JSON数据\r\n");
|
||||||
out.write(" .then(data => {\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(" })\r\n");
|
||||||
out.write(" .catch(error => {\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(" });\r\n");
|
||||||
out.write(" } else {\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(" }\r\n");
|
||||||
out.write("\r\n");
|
out.write("\r\n");
|
||||||
out.write(" function populateSelect(selectElement, data, placeholder) {\r\n");
|
out.write(" function populateSelect(selectElement, data, placeholder) {\r\n");
|
||||||
out.write(" selectElement.innerHTML = \"\";\r\n");
|
out.write(" selectElement.innerHTML = \"\"; // 清空下拉框\r\n");
|
||||||
out.write(" const defaultOption = document.createElement(\"option\");\r\n");
|
out.write(" const defaultOption = document.createElement(\"option\"); // 创建默认选项\r\n");
|
||||||
out.write(" defaultOption.value = \"\";\r\n");
|
out.write(" defaultOption.value = \"\"; // 默认选项值\r\n");
|
||||||
out.write(" defaultOption.text = placeholder;\r\n");
|
out.write(" defaultOption.text = placeholder; // 默认选项文本\r\n");
|
||||||
out.write(" selectElement.appendChild(defaultOption);\r\n");
|
out.write(" selectElement.appendChild(defaultOption); // 添加默认选项\r\n");
|
||||||
out.write("\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(" const option = document.createElement(\"option\");\r\n");
|
||||||
out.write(" option.value = item.value || item.course_id;\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(" option.text = item.text || item.course_name; // 设置选项文本\r\n");
|
||||||
out.write(" selectElement.appendChild(option);\r\n");
|
out.write(" selectElement.appendChild(option); // 添加选项\r\n");
|
||||||
out.write(" });\r\n");
|
out.write(" });\r\n");
|
||||||
out.write(" }\r\n");
|
out.write(" }\r\n");
|
||||||
out.write(" </script>\r\n");
|
out.write(" </script>\r\n");
|
||||||
|
@ -253,31 +253,29 @@ public final class evaluate_jsp extends org.apache.jasper.runtime.HttpJspBase
|
||||||
out.write(" <h1>学生评教系统</h1>\r\n");
|
out.write(" <h1>学生评教系统</h1>\r\n");
|
||||||
out.write(" <form id=\"evaluationForm\" action=\"evaluationPage.jsp\" method=\"get\">\r\n");
|
out.write(" <form id=\"evaluationForm\" action=\"evaluationPage.jsp\" method=\"get\">\r\n");
|
||||||
out.write(" <div class=\"form-group\">\r\n");
|
out.write(" <div class=\"form-group\">\r\n");
|
||||||
out.write(" <label for=\"college\">选择学院:</label>\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(" <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(" <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(" </select>\r\n");
|
||||||
out.write(" </div>\r\n");
|
out.write(" </div>\r\n");
|
||||||
out.write(" <div class=\"form-group\">\r\n");
|
out.write(" <div class=\"form-group\">\r\n");
|
||||||
out.write(" <label for=\"teacher\">选择老师:</label>\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(" <select id=\"teacher\" name=\"teacher\" onchange=\"loadCourses(this.value)\"> <!-- 老师下拉框 -->\r\n");
|
||||||
out.write(" <option value=\"\">--请选择老师--</option>\r\n");
|
out.write(" <option value=\"\">--请选择老师--</option> <!-- 默认选项 -->\r\n");
|
||||||
out.write(" </select>\r\n");
|
out.write(" </select>\r\n");
|
||||||
out.write(" </div>\r\n");
|
out.write(" </div>\r\n");
|
||||||
out.write(" <div class=\"form-group\">\r\n");
|
out.write(" <div class=\"form-group\">\r\n");
|
||||||
out.write(" <label for=\"course\">选择课程:</label>\r\n");
|
out.write(" <label for=\"course\">选择课程:</label> <!-- 课程标签 -->\r\n");
|
||||||
out.write(" <select id=\"course\" name=\"course\">\r\n");
|
out.write(" <select id=\"course\" name=\"course\"> <!-- 课程下拉框 -->\r\n");
|
||||||
out.write(" <option value=\"\">--请选择课程--</option>\r\n");
|
out.write(" <option value=\"\">--请选择课程--</option> <!-- 默认选项 -->\r\n");
|
||||||
out.write(" </select>\r\n");
|
out.write(" </select>\r\n");
|
||||||
out.write(" </div>\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(" </form>\r\n");
|
||||||
out.write(" <div class=\"hint\">请选择学院、老师以及课程,然后进入评教页面。</div>\r\n");
|
out.write(" <div class=\"hint\">请选择学院、老师以及课程,然后进入评教页面。</div> <!-- 提示语 -->\r\n");
|
||||||
out.write(" <div class=\"hint\">");
|
|
||||||
out.write("</div>\r\n");
|
|
||||||
out.write("</div>\r\n");
|
out.write("</div>\r\n");
|
||||||
out.write("</body>\r\n");
|
out.write("</body>\r\n");
|
||||||
out.write("</html>");
|
out.write("</html>");
|
||||||
|
|
Binary file not shown.
|
@ -1,296 +0,0 @@
|
||||||
/*
|
|
||||||
* Generated by the Jasper component of Apache Tomcat
|
|
||||||
* Version: Apache Tomcat/9.0.98
|
|
||||||
* Generated at: 2025-02-12 05:54:52 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.
|
|
||||||
*/
|
|
||||||
package org.apache.jsp;
|
|
||||||
|
|
||||||
import javax.servlet.*;
|
|
||||||
import javax.servlet.http.*;
|
|
||||||
import javax.servlet.jsp.*;
|
|
||||||
import java.sql.*;
|
|
||||||
import org.json.JSONArray;
|
|
||||||
import org.json.JSONObject;
|
|
||||||
|
|
||||||
public final class evaluationPage_jsp extends org.apache.jasper.runtime.HttpJspBase
|
|
||||||
implements org.apache.jasper.runtime.JspSourceDependent,
|
|
||||||
org.apache.jasper.runtime.JspSourceImports {
|
|
||||||
|
|
||||||
private static final javax.servlet.jsp.JspFactory _jspxFactory =
|
|
||||||
javax.servlet.jsp.JspFactory.getDefaultFactory();
|
|
||||||
|
|
||||||
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
|
|
||||||
|
|
||||||
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
|
|
||||||
|
|
||||||
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
|
|
||||||
|
|
||||||
static {
|
|
||||||
_jspx_imports_packages = new java.util.LinkedHashSet<>(6);
|
|
||||||
_jspx_imports_packages.add("java.sql");
|
|
||||||
_jspx_imports_packages.add("javax.servlet");
|
|
||||||
_jspx_imports_packages.add("javax.servlet.http");
|
|
||||||
_jspx_imports_packages.add("javax.servlet.jsp");
|
|
||||||
_jspx_imports_classes = new java.util.LinkedHashSet<>(3);
|
|
||||||
_jspx_imports_classes.add("org.json.JSONObject");
|
|
||||||
_jspx_imports_classes.add("org.json.JSONArray");
|
|
||||||
}
|
|
||||||
|
|
||||||
private volatile javax.el.ExpressionFactory _el_expressionfactory;
|
|
||||||
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
|
|
||||||
|
|
||||||
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
|
|
||||||
return _jspx_dependants;
|
|
||||||
}
|
|
||||||
|
|
||||||
public java.util.Set<java.lang.String> getPackageImports() {
|
|
||||||
return _jspx_imports_packages;
|
|
||||||
}
|
|
||||||
|
|
||||||
public java.util.Set<java.lang.String> getClassImports() {
|
|
||||||
return _jspx_imports_classes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
|
|
||||||
if (_el_expressionfactory == null) {
|
|
||||||
synchronized (this) {
|
|
||||||
if (_el_expressionfactory == null) {
|
|
||||||
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _el_expressionfactory;
|
|
||||||
}
|
|
||||||
|
|
||||||
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
|
|
||||||
if (_jsp_instancemanager == null) {
|
|
||||||
synchronized (this) {
|
|
||||||
if (_jsp_instancemanager == null) {
|
|
||||||
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _jsp_instancemanager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void _jspInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public void _jspDestroy() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
|
|
||||||
throws java.io.IOException, javax.servlet.ServletException {
|
|
||||||
|
|
||||||
if (!javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
|
|
||||||
final java.lang.String _jspx_method = request.getMethod();
|
|
||||||
if ("OPTIONS".equals(_jspx_method)) {
|
|
||||||
response.setHeader("Allow","GET, HEAD, POST, OPTIONS");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method)) {
|
|
||||||
response.setHeader("Allow","GET, HEAD, POST, OPTIONS");
|
|
||||||
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSP 只允许 GET、POST 或 HEAD。Jasper 还允许 OPTIONS");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
final javax.servlet.jsp.PageContext pageContext;
|
|
||||||
javax.servlet.http.HttpSession session = null;
|
|
||||||
final javax.servlet.ServletContext application;
|
|
||||||
final javax.servlet.ServletConfig config;
|
|
||||||
javax.servlet.jsp.JspWriter out = null;
|
|
||||||
final java.lang.Object page = this;
|
|
||||||
javax.servlet.jsp.JspWriter _jspx_out = null;
|
|
||||||
javax.servlet.jsp.PageContext _jspx_page_context = null;
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
|
||||||
response.setContentType("text/html; charset=UTF-8");
|
|
||||||
pageContext = _jspxFactory.getPageContext(this, request, response,
|
|
||||||
null, true, 8192, true);
|
|
||||||
_jspx_page_context = pageContext;
|
|
||||||
application = pageContext.getServletContext();
|
|
||||||
config = pageContext.getServletConfig();
|
|
||||||
session = pageContext.getSession();
|
|
||||||
out = pageContext.getOut();
|
|
||||||
_jspx_out = out;
|
|
||||||
|
|
||||||
out.write("\r\n");
|
|
||||||
out.write("\r\n");
|
|
||||||
|
|
||||||
String college = request.getParameter("college");
|
|
||||||
String teacher = request.getParameter("teacher");
|
|
||||||
String course = request.getParameter("course");
|
|
||||||
|
|
||||||
if (college == null || teacher == null || course == null) {
|
|
||||||
response.sendRedirect("evaluation.jsp");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
JSONArray dimensions = new JSONArray();
|
|
||||||
int totalQuestionCount = 0;
|
|
||||||
try {
|
|
||||||
Class.forName("com.mysql.cj.jdbc.Driver");
|
|
||||||
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "SchoolST", "123456");
|
|
||||||
|
|
||||||
String sql = "SELECT d.dimension_id, d.name AS dimension_name, d.weight, q.question_id, q.question_text " +
|
|
||||||
"FROM dimensions d " +
|
|
||||||
"JOIN questions q ON d.dimension_id = q.dimension_id " +
|
|
||||||
"ORDER BY d.dimension_id, q.question_id";
|
|
||||||
Statement stmt = conn.createStatement();
|
|
||||||
ResultSet rs = stmt.executeQuery(sql);
|
|
||||||
|
|
||||||
JSONObject currentDimension = null;
|
|
||||||
int lastDimensionId = -1;
|
|
||||||
|
|
||||||
while (rs.next()) {
|
|
||||||
int dimensionId = rs.getInt("dimension_id");
|
|
||||||
if (dimensionId != lastDimensionId) {
|
|
||||||
if (currentDimension != null) {
|
|
||||||
dimensions.put(currentDimension);
|
|
||||||
}
|
|
||||||
currentDimension = new JSONObject();
|
|
||||||
currentDimension.put("dimension_id", dimensionId);
|
|
||||||
currentDimension.put("dimension_name", rs.getString("dimension_name"));
|
|
||||||
currentDimension.put("weight", rs.getFloat("weight"));
|
|
||||||
currentDimension.put("questions", new JSONArray());
|
|
||||||
lastDimensionId = dimensionId;
|
|
||||||
}
|
|
||||||
|
|
||||||
JSONObject question = new JSONObject();
|
|
||||||
question.put("question_id", rs.getInt("question_id"));
|
|
||||||
question.put("question_text", rs.getString("question_text"));
|
|
||||||
currentDimension.getJSONArray("questions").put(question);
|
|
||||||
|
|
||||||
totalQuestionCount++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentDimension != null) {
|
|
||||||
dimensions.put(currentDimension);
|
|
||||||
}
|
|
||||||
|
|
||||||
rs.close();
|
|
||||||
stmt.close();
|
|
||||||
conn.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
out.write("\r\n");
|
|
||||||
out.write("<!DOCTYPE html>\r\n");
|
|
||||||
out.write("<html>\r\n");
|
|
||||||
out.write("<head>\r\n");
|
|
||||||
out.write(" <title>评教页面</title>\r\n");
|
|
||||||
out.write(" <style>\r\n");
|
|
||||||
out.write(" table {\r\n");
|
|
||||||
out.write(" width: 100%;\r\n");
|
|
||||||
out.write(" border-collapse: collapse;\r\n");
|
|
||||||
out.write(" margin-bottom: 20px;\r\n");
|
|
||||||
out.write(" }\r\n");
|
|
||||||
out.write(" th, td {\r\n");
|
|
||||||
out.write(" padding: 10px;\r\n");
|
|
||||||
out.write(" border: 1px solid #ddd;\r\n");
|
|
||||||
out.write(" text-align: left;\r\n");
|
|
||||||
out.write(" }\r\n");
|
|
||||||
out.write(" th {\r\n");
|
|
||||||
out.write(" background-color: #f2f2f2;\r\n");
|
|
||||||
out.write(" }\r\n");
|
|
||||||
out.write(" .dimension-title {\r\n");
|
|
||||||
out.write(" font-size: 18px;\r\n");
|
|
||||||
out.write(" font-weight: bold;\r\n");
|
|
||||||
out.write(" margin-top: 20px;\r\n");
|
|
||||||
out.write(" margin-bottom: 10px;\r\n");
|
|
||||||
out.write(" }\r\n");
|
|
||||||
out.write(" .question-text {\r\n");
|
|
||||||
out.write(" font-weight: normal;\r\n");
|
|
||||||
out.write(" }\r\n");
|
|
||||||
out.write(" </style>\r\n");
|
|
||||||
out.write("</head>\r\n");
|
|
||||||
out.write("<body>\r\n");
|
|
||||||
out.write("<h1>评教页面</h1>\r\n");
|
|
||||||
out.write("<form action=\"submitEvaluation.jsp\" method=\"post\" onsubmit=\"return validateForm()\">\r\n");
|
|
||||||
out.write(" <input type=\"hidden\" name=\"college\" value=\"");
|
|
||||||
out.print( college );
|
|
||||||
out.write("\">\r\n");
|
|
||||||
out.write(" <input type=\"hidden\" name=\"teacher\" value=\"");
|
|
||||||
out.print( teacher );
|
|
||||||
out.write("\">\r\n");
|
|
||||||
out.write(" <input type=\"hidden\" name=\"course\" value=\"");
|
|
||||||
out.print( course );
|
|
||||||
out.write("\">\r\n");
|
|
||||||
out.write("\r\n");
|
|
||||||
out.write(" ");
|
|
||||||
|
|
||||||
for (int i = 0; i < dimensions.length(); i++) {
|
|
||||||
JSONObject dimension = dimensions.getJSONObject(i);
|
|
||||||
out.println("<div class='dimension-title'>" + dimension.getString("dimension_name") + "(权重:" + dimension.getFloat("weight") + "%)</div>");
|
|
||||||
out.println("<table>");
|
|
||||||
out.println("<thead><tr><th>题目</th><th>符合</th><th>不符合</th></tr></thead>");
|
|
||||||
out.println("<tbody>");
|
|
||||||
|
|
||||||
JSONArray questions = dimension.getJSONArray("questions");
|
|
||||||
for (int j = 0; j < questions.length(); j++) {
|
|
||||||
JSONObject question = questions.getJSONObject(j);
|
|
||||||
out.println("<tr>");
|
|
||||||
out.println("<td class='question-text'>" + question.getString("question_text") + "</td>");
|
|
||||||
out.println("<td><input type='radio' name='question_" + question.getInt("question_id") + "' value='1' required></td>");
|
|
||||||
out.println("<td><input type='radio' name='question_" + question.getInt("question_id") + "' value='0' required></td>");
|
|
||||||
out.println("</tr>");
|
|
||||||
}
|
|
||||||
|
|
||||||
out.println("</tbody></table>");
|
|
||||||
}
|
|
||||||
|
|
||||||
out.write("\r\n");
|
|
||||||
out.write("\r\n");
|
|
||||||
out.write(" <button type=\"submit\">提交评价</button>\r\n");
|
|
||||||
out.write("</form>\r\n");
|
|
||||||
out.write("\r\n");
|
|
||||||
out.write("<script>\r\n");
|
|
||||||
out.write(" const totalQuestionCount = ");
|
|
||||||
out.print( totalQuestionCount );
|
|
||||||
out.write(";\r\n");
|
|
||||||
out.write("\r\n");
|
|
||||||
out.write(" function validateForm() {\r\n");
|
|
||||||
out.write(" const allQuestions = document.querySelectorAll(\"input[type='radio']\");\r\n");
|
|
||||||
out.write(" const answered = new Set();\r\n");
|
|
||||||
out.write("\r\n");
|
|
||||||
out.write(" allQuestions.forEach(input => {\r\n");
|
|
||||||
out.write(" if (input.checked) {\r\n");
|
|
||||||
out.write(" const questionId = input.name.replace(\"question_\", \"\");\r\n");
|
|
||||||
out.write(" answered.add(questionId);\r\n");
|
|
||||||
out.write(" }\r\n");
|
|
||||||
out.write(" });\r\n");
|
|
||||||
out.write("\r\n");
|
|
||||||
out.write(" if (answered.size !== totalQuestionCount) {\r\n");
|
|
||||||
out.write(" alert(\"请完成所有题目的评价后再提交!\");\r\n");
|
|
||||||
out.write(" return false;\r\n");
|
|
||||||
out.write(" }\r\n");
|
|
||||||
out.write(" return true;\r\n");
|
|
||||||
out.write(" }\r\n");
|
|
||||||
out.write("</script>\r\n");
|
|
||||||
out.write("</body>\r\n");
|
|
||||||
out.write("</html>");
|
|
||||||
} catch (java.lang.Throwable t) {
|
|
||||||
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
|
|
||||||
out = _jspx_out;
|
|
||||||
if (out != null && out.getBufferSize() != 0)
|
|
||||||
try {
|
|
||||||
if (response.isCommitted()) {
|
|
||||||
out.flush();
|
|
||||||
} else {
|
|
||||||
out.clearBuffer();
|
|
||||||
}
|
|
||||||
} catch (java.io.IOException e) {}
|
|
||||||
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
|
|
||||||
else throw new ServletException(t);
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
_jspxFactory.releasePageContext(_jspx_page_context);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
|
@ -1,172 +0,0 @@
|
||||||
/*
|
|
||||||
* Generated by the Jasper component of Apache Tomcat
|
|
||||||
* Version: Apache Tomcat/9.0.98
|
|
||||||
* Generated at: 2025-02-12 05:54:50 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.
|
|
||||||
*/
|
|
||||||
package org.apache.jsp;
|
|
||||||
|
|
||||||
import javax.servlet.*;
|
|
||||||
import javax.servlet.http.*;
|
|
||||||
import javax.servlet.jsp.*;
|
|
||||||
import java.sql.*;
|
|
||||||
import org.json.JSONArray;
|
|
||||||
import org.json.JSONObject;
|
|
||||||
|
|
||||||
public final class loadCourses_jsp extends org.apache.jasper.runtime.HttpJspBase
|
|
||||||
implements org.apache.jasper.runtime.JspSourceDependent,
|
|
||||||
org.apache.jasper.runtime.JspSourceImports {
|
|
||||||
|
|
||||||
private static final javax.servlet.jsp.JspFactory _jspxFactory =
|
|
||||||
javax.servlet.jsp.JspFactory.getDefaultFactory();
|
|
||||||
|
|
||||||
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
|
|
||||||
|
|
||||||
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
|
|
||||||
|
|
||||||
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
|
|
||||||
|
|
||||||
static {
|
|
||||||
_jspx_imports_packages = new java.util.LinkedHashSet<>(6);
|
|
||||||
_jspx_imports_packages.add("java.sql");
|
|
||||||
_jspx_imports_packages.add("javax.servlet");
|
|
||||||
_jspx_imports_packages.add("javax.servlet.http");
|
|
||||||
_jspx_imports_packages.add("javax.servlet.jsp");
|
|
||||||
_jspx_imports_classes = new java.util.LinkedHashSet<>(3);
|
|
||||||
_jspx_imports_classes.add("org.json.JSONObject");
|
|
||||||
_jspx_imports_classes.add("org.json.JSONArray");
|
|
||||||
}
|
|
||||||
|
|
||||||
private volatile javax.el.ExpressionFactory _el_expressionfactory;
|
|
||||||
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
|
|
||||||
|
|
||||||
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
|
|
||||||
return _jspx_dependants;
|
|
||||||
}
|
|
||||||
|
|
||||||
public java.util.Set<java.lang.String> getPackageImports() {
|
|
||||||
return _jspx_imports_packages;
|
|
||||||
}
|
|
||||||
|
|
||||||
public java.util.Set<java.lang.String> getClassImports() {
|
|
||||||
return _jspx_imports_classes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
|
|
||||||
if (_el_expressionfactory == null) {
|
|
||||||
synchronized (this) {
|
|
||||||
if (_el_expressionfactory == null) {
|
|
||||||
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _el_expressionfactory;
|
|
||||||
}
|
|
||||||
|
|
||||||
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
|
|
||||||
if (_jsp_instancemanager == null) {
|
|
||||||
synchronized (this) {
|
|
||||||
if (_jsp_instancemanager == null) {
|
|
||||||
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _jsp_instancemanager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void _jspInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public void _jspDestroy() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
|
|
||||||
throws java.io.IOException, javax.servlet.ServletException {
|
|
||||||
|
|
||||||
if (!javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
|
|
||||||
final java.lang.String _jspx_method = request.getMethod();
|
|
||||||
if ("OPTIONS".equals(_jspx_method)) {
|
|
||||||
response.setHeader("Allow","GET, HEAD, POST, OPTIONS");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method)) {
|
|
||||||
response.setHeader("Allow","GET, HEAD, POST, OPTIONS");
|
|
||||||
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSP 只允许 GET、POST 或 HEAD。Jasper 还允许 OPTIONS");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
final javax.servlet.jsp.PageContext pageContext;
|
|
||||||
javax.servlet.http.HttpSession session = null;
|
|
||||||
final javax.servlet.ServletContext application;
|
|
||||||
final javax.servlet.ServletConfig config;
|
|
||||||
javax.servlet.jsp.JspWriter out = null;
|
|
||||||
final java.lang.Object page = this;
|
|
||||||
javax.servlet.jsp.JspWriter _jspx_out = null;
|
|
||||||
javax.servlet.jsp.PageContext _jspx_page_context = null;
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
|
||||||
response.setContentType("application/json; charset=UTF-8");
|
|
||||||
pageContext = _jspxFactory.getPageContext(this, request, response,
|
|
||||||
null, true, 8192, true);
|
|
||||||
_jspx_page_context = pageContext;
|
|
||||||
application = pageContext.getServletContext();
|
|
||||||
config = pageContext.getServletConfig();
|
|
||||||
session = pageContext.getSession();
|
|
||||||
out = pageContext.getOut();
|
|
||||||
_jspx_out = out;
|
|
||||||
|
|
||||||
out.write("\r\n");
|
|
||||||
out.write("\r\n");
|
|
||||||
|
|
||||||
String teacherId = request.getParameter("teacher");
|
|
||||||
JSONArray courses = new JSONArray();
|
|
||||||
|
|
||||||
if (teacherId != null && !teacherId.isEmpty()) {
|
|
||||||
try {
|
|
||||||
Class.forName("com.mysql.cj.jdbc.Driver");
|
|
||||||
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "SchoolST", "123456");
|
|
||||||
String sql = "SELECT * FROM courses WHERE teacher_id = ?";
|
|
||||||
PreparedStatement pstmt = conn.prepareStatement(sql);
|
|
||||||
pstmt.setString(1, teacherId);
|
|
||||||
ResultSet rs = pstmt.executeQuery();
|
|
||||||
|
|
||||||
while (rs.next()) {
|
|
||||||
JSONObject course = new JSONObject();
|
|
||||||
course.put("course_id", rs.getInt("course_id"));
|
|
||||||
course.put("course_name", rs.getString("course_name"));
|
|
||||||
courses.put(course);
|
|
||||||
}
|
|
||||||
|
|
||||||
rs.close();
|
|
||||||
pstmt.close();
|
|
||||||
conn.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
out.print(courses.toString());
|
|
||||||
|
|
||||||
} catch (java.lang.Throwable t) {
|
|
||||||
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
|
|
||||||
out = _jspx_out;
|
|
||||||
if (out != null && out.getBufferSize() != 0)
|
|
||||||
try {
|
|
||||||
if (response.isCommitted()) {
|
|
||||||
out.flush();
|
|
||||||
} else {
|
|
||||||
out.clearBuffer();
|
|
||||||
}
|
|
||||||
} catch (java.io.IOException e) {}
|
|
||||||
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
|
|
||||||
else throw new ServletException(t);
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
_jspxFactory.releasePageContext(_jspx_page_context);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
|
@ -1,159 +0,0 @@
|
||||||
/*
|
|
||||||
* Generated by the Jasper component of Apache Tomcat
|
|
||||||
* Version: Apache Tomcat/9.0.98
|
|
||||||
* Generated at: 2025-02-12 05:53:04 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.
|
|
||||||
*/
|
|
||||||
package org.apache.jsp;
|
|
||||||
|
|
||||||
import javax.servlet.*;
|
|
||||||
import javax.servlet.http.*;
|
|
||||||
import javax.servlet.jsp.*;
|
|
||||||
import java.sql.*;
|
|
||||||
|
|
||||||
public final class loadTeachers_jsp extends org.apache.jasper.runtime.HttpJspBase
|
|
||||||
implements org.apache.jasper.runtime.JspSourceDependent,
|
|
||||||
org.apache.jasper.runtime.JspSourceImports {
|
|
||||||
|
|
||||||
private static final javax.servlet.jsp.JspFactory _jspxFactory =
|
|
||||||
javax.servlet.jsp.JspFactory.getDefaultFactory();
|
|
||||||
|
|
||||||
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
|
|
||||||
|
|
||||||
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
|
|
||||||
|
|
||||||
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
|
|
||||||
|
|
||||||
static {
|
|
||||||
_jspx_imports_packages = new java.util.LinkedHashSet<>(6);
|
|
||||||
_jspx_imports_packages.add("java.sql");
|
|
||||||
_jspx_imports_packages.add("javax.servlet");
|
|
||||||
_jspx_imports_packages.add("javax.servlet.http");
|
|
||||||
_jspx_imports_packages.add("javax.servlet.jsp");
|
|
||||||
_jspx_imports_classes = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private volatile javax.el.ExpressionFactory _el_expressionfactory;
|
|
||||||
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
|
|
||||||
|
|
||||||
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
|
|
||||||
return _jspx_dependants;
|
|
||||||
}
|
|
||||||
|
|
||||||
public java.util.Set<java.lang.String> getPackageImports() {
|
|
||||||
return _jspx_imports_packages;
|
|
||||||
}
|
|
||||||
|
|
||||||
public java.util.Set<java.lang.String> getClassImports() {
|
|
||||||
return _jspx_imports_classes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
|
|
||||||
if (_el_expressionfactory == null) {
|
|
||||||
synchronized (this) {
|
|
||||||
if (_el_expressionfactory == null) {
|
|
||||||
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _el_expressionfactory;
|
|
||||||
}
|
|
||||||
|
|
||||||
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
|
|
||||||
if (_jsp_instancemanager == null) {
|
|
||||||
synchronized (this) {
|
|
||||||
if (_jsp_instancemanager == null) {
|
|
||||||
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _jsp_instancemanager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void _jspInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public void _jspDestroy() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
|
|
||||||
throws java.io.IOException, javax.servlet.ServletException {
|
|
||||||
|
|
||||||
if (!javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
|
|
||||||
final java.lang.String _jspx_method = request.getMethod();
|
|
||||||
if ("OPTIONS".equals(_jspx_method)) {
|
|
||||||
response.setHeader("Allow","GET, HEAD, POST, OPTIONS");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method)) {
|
|
||||||
response.setHeader("Allow","GET, HEAD, POST, OPTIONS");
|
|
||||||
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSP 只允许 GET、POST 或 HEAD。Jasper 还允许 OPTIONS");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
final javax.servlet.jsp.PageContext pageContext;
|
|
||||||
javax.servlet.http.HttpSession session = null;
|
|
||||||
final javax.servlet.ServletContext application;
|
|
||||||
final javax.servlet.ServletConfig config;
|
|
||||||
javax.servlet.jsp.JspWriter out = null;
|
|
||||||
final java.lang.Object page = this;
|
|
||||||
javax.servlet.jsp.JspWriter _jspx_out = null;
|
|
||||||
javax.servlet.jsp.PageContext _jspx_page_context = null;
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
|
||||||
response.setContentType("text/html; charset=UTF-8");
|
|
||||||
pageContext = _jspxFactory.getPageContext(this, request, response,
|
|
||||||
null, true, 8192, true);
|
|
||||||
_jspx_page_context = pageContext;
|
|
||||||
application = pageContext.getServletContext();
|
|
||||||
config = pageContext.getServletConfig();
|
|
||||||
session = pageContext.getSession();
|
|
||||||
out = pageContext.getOut();
|
|
||||||
_jspx_out = out;
|
|
||||||
|
|
||||||
out.write("\r\n");
|
|
||||||
out.write("\r\n");
|
|
||||||
|
|
||||||
String college = request.getParameter("college");
|
|
||||||
if (college != null && !college.isEmpty()) {
|
|
||||||
try {
|
|
||||||
Class.forName("com.mysql.cj.jdbc.Driver");
|
|
||||||
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "SchoolST", "123456");
|
|
||||||
String sql = "SELECT * FROM teachers WHERE college = ?";
|
|
||||||
PreparedStatement pstmt = conn.prepareStatement(sql);
|
|
||||||
pstmt.setString(1, college);
|
|
||||||
ResultSet rs = pstmt.executeQuery();
|
|
||||||
while (rs.next()) {
|
|
||||||
out.println("<option value='" + rs.getInt("teacher_id") + "'>" + rs.getString("name") + "</option>");
|
|
||||||
}
|
|
||||||
rs.close();
|
|
||||||
pstmt.close();
|
|
||||||
conn.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (java.lang.Throwable t) {
|
|
||||||
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
|
|
||||||
out = _jspx_out;
|
|
||||||
if (out != null && out.getBufferSize() != 0)
|
|
||||||
try {
|
|
||||||
if (response.isCommitted()) {
|
|
||||||
out.flush();
|
|
||||||
} else {
|
|
||||||
out.clearBuffer();
|
|
||||||
}
|
|
||||||
} catch (java.io.IOException e) {}
|
|
||||||
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
|
|
||||||
else throw new ServletException(t);
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
_jspxFactory.releasePageContext(_jspx_page_context);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue