summaryrefslogtreecommitdiff
path: root/maven/03-hello2-form-submission-webapp/README
diff options
context:
space:
mode:
Diffstat (limited to 'maven/03-hello2-form-submission-webapp/README')
-rw-r--r--maven/03-hello2-form-submission-webapp/README28
1 files changed, 28 insertions, 0 deletions
diff --git a/maven/03-hello2-form-submission-webapp/README b/maven/03-hello2-form-submission-webapp/README
new file mode 100644
index 0000000..015d62f
--- /dev/null
+++ b/maven/03-hello2-form-submission-webapp/README
@@ -0,0 +1,28 @@
+This webapp shows how a servlet is used to process a form submission.
+
+Command to generate this webapp from Maven archetype:
+
+mvn archetype:generate -DgroupId=com.example.servletapp \
+ -DartifactId=hello2 \
+ -DarchetypeArtifactId=maven-archetype-webapp \
+ -DinteractiveMode=false
+
+Open the project inside the IDE (like Visual Studio Code).
+
+Update the pom.xml file to the one provided here.
+
+Create directory src/main/java .
+
+Create a new package (say lk.ac.pdn.ceit.hello).
+
+Create a new Java class (name it PostExampleServlet).
+
+Complete the Java class (look at the given PostExampleServlet.java file).
+
+Replace the content of src/main/webapp/index.jsp with the one provided.
+
+Build the project:
+
+ mvn clean package
+
+Deploy the generated hello2.war to Tomcat and access it via http://localhost:8080/hello2/.