commit bacf80e22e0e81838a54bfabe48ca9cd5e2cd126 Author: esoe Date: Sat Jun 4 19:28:35 2022 +0300 qq diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5b583f2 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "maven.view": "hierarchical", + "java.configuration.updateBuildConfiguration": "automatic" +} \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..b75f04d --- /dev/null +++ b/pom.xml @@ -0,0 +1,88 @@ + + + + 4.0.0 + + ru.egspt + moodle-web + 0.1 + war + + + demo + + http://www.example.com + + + UTF-8 + 1.8 + 1.8 + + + + + junit + junit + 4.11 + test + + + + jakarta.servlet + jakarta.servlet-api + 5.0.0 + provided + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-war-plugin + 3.3.1 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + + diff --git a/src/main/java/ru/egspt/MainServlet.java b/src/main/java/ru/egspt/MainServlet.java new file mode 100644 index 0000000..6e506aa --- /dev/null +++ b/src/main/java/ru/egspt/MainServlet.java @@ -0,0 +1,20 @@ +package ru.egspt; +import jakarta.servlet.ServletException; +import jakarta.servlet.annotation.WebServlet; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.PrintWriter; + +@WebServlet("/hello") +public class MainServlet extends HttpServlet { + + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + resp.setContentType("text/html"); + PrintWriter printWriter = resp.getWriter(); + printWriter.write("it works!"); + printWriter.close(); + } +} \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..3c5df65 --- /dev/null +++ b/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,11 @@ + + + + moodle-web-report + + + hello + + \ No newline at end of file diff --git a/target/classes/ru/egspt/MainServlet.class b/target/classes/ru/egspt/MainServlet.class new file mode 100644 index 0000000..5d51313 Binary files /dev/null and b/target/classes/ru/egspt/MainServlet.class differ diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties new file mode 100644 index 0000000..1c88cce --- /dev/null +++ b/target/maven-archiver/pom.properties @@ -0,0 +1,3 @@ +artifactId=moodle-web +groupId=ru.egspt +version=0.1 diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..31bf67b --- /dev/null +++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1 @@ +ru/egspt/MainServlet.class diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..d8e6336 --- /dev/null +++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1 @@ +/home/esoe/Documents/code/moodle-web/src/main/java/ru/egspt/MainServlet.java diff --git a/target/moodle-web-0.1.war b/target/moodle-web-0.1.war new file mode 100644 index 0000000..9fafce7 Binary files /dev/null and b/target/moodle-web-0.1.war differ diff --git a/target/moodle-web-0.1/WEB-INF/classes/ru/egspt/MainServlet.class b/target/moodle-web-0.1/WEB-INF/classes/ru/egspt/MainServlet.class new file mode 100644 index 0000000..5d51313 Binary files /dev/null and b/target/moodle-web-0.1/WEB-INF/classes/ru/egspt/MainServlet.class differ diff --git a/target/moodle-web-0.1/WEB-INF/web.xml b/target/moodle-web-0.1/WEB-INF/web.xml new file mode 100644 index 0000000..3c5df65 --- /dev/null +++ b/target/moodle-web-0.1/WEB-INF/web.xml @@ -0,0 +1,11 @@ + + + + moodle-web-report + + + hello + + \ No newline at end of file