From 5d1baa830330865a736eeea41f5e32d2d5f80c3d Mon Sep 17 00:00:00 2001 From: Peter Date: Tue, 7 Jul 2020 16:22:25 +0500 Subject: [PATCH] add jsp files --- .../java/app/servlets/QuestionServlet.java | 19 +++++++ .../main/java/app/servlets/SingInServlet.java | 19 +++++++ .../java/app/servlets/TestScoreServlet.java | 20 ++++++++ .../main/java/app/servlets/TestServlet.java | 19 +++++++ .../app/servlets/profile_student_Servlet.java | 19 +++++++ .../src/main/webapp/WEB-INF/web.xml | 50 +++++++++++++++++++ Testing System/src/main/webapp/pages/add.jsp | 8 +-- .../src/main/webapp/pages/profile_student.jsp | 39 +++++++++++++++ .../src/main/webapp/pages/question.jsp | 31 ++++++++++++ .../src/main/webapp/pages/singin.jsp | 25 ++++++++++ Testing System/src/main/webapp/pages/test.jsp | 22 ++++++++ .../src/main/webapp/pages/test_score.jsp | 22 ++++++++ 12 files changed, 289 insertions(+), 4 deletions(-) create mode 100644 Testing System/src/main/java/app/servlets/QuestionServlet.java create mode 100644 Testing System/src/main/java/app/servlets/SingInServlet.java create mode 100644 Testing System/src/main/java/app/servlets/TestScoreServlet.java create mode 100644 Testing System/src/main/java/app/servlets/TestServlet.java create mode 100644 Testing System/src/main/java/app/servlets/profile_student_Servlet.java create mode 100644 Testing System/src/main/webapp/pages/profile_student.jsp create mode 100644 Testing System/src/main/webapp/pages/question.jsp create mode 100644 Testing System/src/main/webapp/pages/singin.jsp create mode 100644 Testing System/src/main/webapp/pages/test.jsp create mode 100644 Testing System/src/main/webapp/pages/test_score.jsp diff --git a/Testing System/src/main/java/app/servlets/QuestionServlet.java b/Testing System/src/main/java/app/servlets/QuestionServlet.java new file mode 100644 index 0000000..e26d574 --- /dev/null +++ b/Testing System/src/main/java/app/servlets/QuestionServlet.java @@ -0,0 +1,19 @@ +package app.servlets; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class QuestionServlet extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + } + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + RequestDispatcher requestDispatcher = request.getRequestDispatcher("pages/question.jsp"); + requestDispatcher.forward(request, response); + } +} \ No newline at end of file diff --git a/Testing System/src/main/java/app/servlets/SingInServlet.java b/Testing System/src/main/java/app/servlets/SingInServlet.java new file mode 100644 index 0000000..719b042 --- /dev/null +++ b/Testing System/src/main/java/app/servlets/SingInServlet.java @@ -0,0 +1,19 @@ +package app.servlets; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class SingInServlet extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + } + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + RequestDispatcher requestDispatcher = request.getRequestDispatcher("pages/singin.jsp"); + requestDispatcher.forward(request, response); + } +} diff --git a/Testing System/src/main/java/app/servlets/TestScoreServlet.java b/Testing System/src/main/java/app/servlets/TestScoreServlet.java new file mode 100644 index 0000000..ebfc9b8 --- /dev/null +++ b/Testing System/src/main/java/app/servlets/TestScoreServlet.java @@ -0,0 +1,20 @@ +package app.servlets; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class TestScoreServlet extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + } + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + RequestDispatcher requestDispatcher = request.getRequestDispatcher("pages/test_score.jsp"); + requestDispatcher.forward(request, response); + } +} + diff --git a/Testing System/src/main/java/app/servlets/TestServlet.java b/Testing System/src/main/java/app/servlets/TestServlet.java new file mode 100644 index 0000000..67df0c2 --- /dev/null +++ b/Testing System/src/main/java/app/servlets/TestServlet.java @@ -0,0 +1,19 @@ +package app.servlets; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class TestServlet extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + } + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + RequestDispatcher requestDispatcher = request.getRequestDispatcher("pages/test.jsp"); + requestDispatcher.forward(request, response); + } +} diff --git a/Testing System/src/main/java/app/servlets/profile_student_Servlet.java b/Testing System/src/main/java/app/servlets/profile_student_Servlet.java new file mode 100644 index 0000000..ea8c6dd --- /dev/null +++ b/Testing System/src/main/java/app/servlets/profile_student_Servlet.java @@ -0,0 +1,19 @@ +package app.servlets; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class profile_student_Servlet extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + } + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + RequestDispatcher requestDispatcher = request.getRequestDispatcher("pages/profile_student.jsp"); + requestDispatcher.forward(request, response); + } +} diff --git a/Testing System/src/main/webapp/WEB-INF/web.xml b/Testing System/src/main/webapp/WEB-INF/web.xml index 00e3c4c..314725f 100644 --- a/Testing System/src/main/webapp/WEB-INF/web.xml +++ b/Testing System/src/main/webapp/WEB-INF/web.xml @@ -13,4 +13,54 @@ add /add + + + profile_student + app.servlets.profile_student_Servlet + + + + profile_student + /profile_student + + + + singin + app.servlets.SingInServlet + + + + singin + /singin + + + + test + app.servlets.TestServlet + + + + test + /test + + + + question + app.servlets.QuestionServlet + + + + question + /question + + + + test_score + app.servlets.TestScoreServlet + + + + test_score + /test_score + diff --git a/Testing System/src/main/webapp/pages/add.jsp b/Testing System/src/main/webapp/pages/add.jsp index 5786af0..8634905 100644 --- a/Testing System/src/main/webapp/pages/add.jsp +++ b/Testing System/src/main/webapp/pages/add.jsp @@ -5,14 +5,14 @@ -
+

Register

Please fill in this form to create an account.


- - + + @@ -25,7 +25,7 @@
diff --git a/Testing System/src/main/webapp/pages/profile_student.jsp b/Testing System/src/main/webapp/pages/profile_student.jsp new file mode 100644 index 0000000..d362cc2 --- /dev/null +++ b/Testing System/src/main/webapp/pages/profile_student.jsp @@ -0,0 +1,39 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + Profile + + +
+
+

Иван Иванович Иванов

+

Студент группы ХХХХХХ

+
+
+
+
+

Доступные для прохождения тесты:

+ +

Пройденные тесты:

+ + + + + + + + + + + + + +
ТестПроцент выполнения
Тест 366%
Тест 487%
+
+
+ + + diff --git a/Testing System/src/main/webapp/pages/question.jsp b/Testing System/src/main/webapp/pages/question.jsp new file mode 100644 index 0000000..902ce28 --- /dev/null +++ b/Testing System/src/main/webapp/pages/question.jsp @@ -0,0 +1,31 @@ +<%-- + Created by IntelliJ IDEA. + User: bozhk + Date: 07.07.2020 + Time: 16:05 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + Question + + +
+

Текст вопроса

+
+

Какое у вас состояние разума?

+

Не дзен

+

Дзен

+

Полный дзен

+

+
+
+
+

Пройдено:

(здесь процесс прохождения)

+
+
+ +
+ + diff --git a/Testing System/src/main/webapp/pages/singin.jsp b/Testing System/src/main/webapp/pages/singin.jsp new file mode 100644 index 0000000..60d922e --- /dev/null +++ b/Testing System/src/main/webapp/pages/singin.jsp @@ -0,0 +1,25 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + Регистрация + + + +
+
+

Sing in

+

Please fill in this form to sing in account.

+
+ + + + + + + + +
+ +
+ + diff --git a/Testing System/src/main/webapp/pages/test.jsp b/Testing System/src/main/webapp/pages/test.jsp new file mode 100644 index 0000000..4112fcb --- /dev/null +++ b/Testing System/src/main/webapp/pages/test.jsp @@ -0,0 +1,22 @@ +<%-- + Created by IntelliJ IDEA. + User: bozhk + Date: 07.07.2020 + Time: 16:05 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + Test + + +
+ +
+
+

Время на прохождение теста:

+

(тут должно быть время)

+
+ + diff --git a/Testing System/src/main/webapp/pages/test_score.jsp b/Testing System/src/main/webapp/pages/test_score.jsp new file mode 100644 index 0000000..f089bcd --- /dev/null +++ b/Testing System/src/main/webapp/pages/test_score.jsp @@ -0,0 +1,22 @@ +<%-- + Created by IntelliJ IDEA. + User: bozhk + Date: 07.07.2020 + Time: 16:17 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + Test score + + +
+

Вы прошли тест ХХХ

+

Ваш итог: (процент выполнения теста)

+
+
+ +
+ +