diff --git a/.gitignore b/.gitignore index 19578fec..0912b4f7 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,5 @@ tomcat.8080 tomcat.5000 # IntelliJ Idea project files -.idea +src/.idea *.iml diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 00000000..acc6ed0c --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +embeddedTomcatSample \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 00000000..decfe1bd --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 00000000..712ab9d9 --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_8_5_38.xml b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_8_5_38.xml new file mode 100644 index 00000000..adcb439a --- /dev/null +++ b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_8_5_38.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_8_5_38.xml b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_8_5_38.xml new file mode 100644 index 00000000..04e618c6 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_8_5_38.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_jasper_8_5_38.xml b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_jasper_8_5_38.xml new file mode 100644 index 00000000..bba0a521 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_jasper_8_5_38.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_tomcat_tomcat_annotations_api_8_5_38.xml b/.idea/libraries/Maven__org_apache_tomcat_tomcat_annotations_api_8_5_38.xml new file mode 100644 index 00000000..e9370458 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_tomcat_tomcat_annotations_api_8_5_38.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_tomcat_tomcat_api_8_5_38.xml b/.idea/libraries/Maven__org_apache_tomcat_tomcat_api_8_5_38.xml new file mode 100644 index 00000000..b2f06d77 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_tomcat_tomcat_api_8_5_38.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_tomcat_tomcat_el_api_8_5_38.xml b/.idea/libraries/Maven__org_apache_tomcat_tomcat_el_api_8_5_38.xml new file mode 100644 index 00000000..fbdc30d0 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_tomcat_tomcat_el_api_8_5_38.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_tomcat_tomcat_jasper_8_5_38.xml b/.idea/libraries/Maven__org_apache_tomcat_tomcat_jasper_8_5_38.xml new file mode 100644 index 00000000..68e3f232 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_tomcat_tomcat_jasper_8_5_38.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_tomcat_tomcat_jasper_el_8_5_38.xml b/.idea/libraries/Maven__org_apache_tomcat_tomcat_jasper_el_8_5_38.xml new file mode 100644 index 00000000..f28037a4 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_tomcat_tomcat_jasper_el_8_5_38.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_tomcat_tomcat_jsp_api_8_5_38.xml b/.idea/libraries/Maven__org_apache_tomcat_tomcat_jsp_api_8_5_38.xml new file mode 100644 index 00000000..521797a8 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_tomcat_tomcat_jsp_api_8_5_38.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_tomcat_tomcat_juli_8_5_38.xml b/.idea/libraries/Maven__org_apache_tomcat_tomcat_juli_8_5_38.xml new file mode 100644 index 00000000..355a6359 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_tomcat_tomcat_juli_8_5_38.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_tomcat_tomcat_servlet_api_8_5_38.xml b/.idea/libraries/Maven__org_apache_tomcat_tomcat_servlet_api_8_5_38.xml new file mode 100644 index 00000000..272a9728 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_tomcat_tomcat_servlet_api_8_5_38.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_tomcat_tomcat_util_8_5_38.xml b/.idea/libraries/Maven__org_apache_tomcat_tomcat_util_8_5_38.xml new file mode 100644 index 00000000..da55a2e9 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_tomcat_tomcat_util_8_5_38.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_tomcat_tomcat_util_scan_8_5_38.xml b/.idea/libraries/Maven__org_apache_tomcat_tomcat_util_scan_8_5_38.xml new file mode 100644 index 00000000..02a6aa48 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_tomcat_tomcat_util_scan_8_5_38.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_eclipse_jdt_ecj_3_12_3.xml b/.idea/libraries/Maven__org_eclipse_jdt_ecj_3_12_3.xml new file mode 100644 index 00000000..96c4694c --- /dev/null +++ b/.idea/libraries/Maven__org_eclipse_jdt_ecj_3_12_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..9896aeb3 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..e13edf5e --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 00000000..8a285ffe --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1625385337452 + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 5c3a0db8..60744143 100644 --- a/pom.xml +++ b/pom.xml @@ -1,67 +1,75 @@ - 4.0.0 - com.heroku.sample - embeddedTomcatSample - 1.0-SNAPSHOT - jar - embeddedTomcatSample Maven Webapp - http://maven.apache.org - - 8.5.38 - - - - org.apache.tomcat.embed - tomcat-embed-core - ${tomcat.version} - - - org.apache.tomcat.embed - tomcat-embed-jasper - ${tomcat.version} - - - org.apache.tomcat - tomcat-jasper - ${tomcat.version} - - - org.apache.tomcat - tomcat-jasper-el - ${tomcat.version} - - - org.apache.tomcat - tomcat-jsp-api - ${tomcat.version} - - - - embeddedTomcatSample - - - org.codehaus.mojo - appassembler-maven-plugin - 2.0.0 - - target - - - launch.Main - webapp - - - - - - package - - assemble - - - - - - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + com.heroku.sample + embeddedTomcatSample + 1.0-SNAPSHOT + jar + embeddedTomcatSample Maven Webapp + http://maven.apache.org + + 8.5.38 + + + + org.apache.tomcat.embed + tomcat-embed-core + ${tomcat.version} + + + org.apache.tomcat.embed + tomcat-embed-jasper + ${tomcat.version} + + + org.apache.tomcat + tomcat-jasper + ${tomcat.version} + + + org.apache.tomcat + tomcat-jasper-el + ${tomcat.version} + + + org.apache.tomcat + tomcat-jsp-api + ${tomcat.version} + + + + embeddedTomcatSample + + + org.codehaus.mojo + appassembler-maven-plugin + 2.0.0 + + target + + + launch.Main + webapp + + + + + + package + + assemble + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 7 + 7 + + + + diff --git a/src/main/java/servlet/HelloServlet.java b/src/main/java/servlet/HelloServlet.java index 34d5521c..b8dc8f05 100644 --- a/src/main/java/servlet/HelloServlet.java +++ b/src/main/java/servlet/HelloServlet.java @@ -10,8 +10,8 @@ import javax.servlet.http.HttpServletResponse; @WebServlet( - name = "MyServlet", - urlPatterns = {"/hello"} + name = "homeServlet", + urlPatterns = {"/home"} ) public class HelloServlet extends HttpServlet { @@ -19,7 +19,15 @@ public class HelloServlet extends HttpServlet { protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { ServletOutputStream out = resp.getOutputStream(); - out.write("hello heroku".getBytes()); + out.write("".getBytes()); + + out.write("

Typing Game!

".getBytes()); + + out.flush(); out.close(); }