From 9df2dec568231a9ce0e3cc6a0709922c9140e281 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 10 Apr 2018 16:24:19 +0200 Subject: [PATCH] Add exo7 code. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- ROOT/exo7/META-INF/context.xml | 2 ++ ROOT/exo7/form.jsp | 13 +++++++++++++ ROOT/exo7/nextpage.jsp | 5 +++++ ROOT/exo7/savename.jsp | 11 +++++++++++ 4 files changed, 31 insertions(+) create mode 100644 ROOT/exo7/META-INF/context.xml create mode 100644 ROOT/exo7/form.jsp create mode 100644 ROOT/exo7/nextpage.jsp create mode 100644 ROOT/exo7/savename.jsp diff --git a/ROOT/exo7/META-INF/context.xml b/ROOT/exo7/META-INF/context.xml new file mode 100644 index 0000000..00e2ff6 --- /dev/null +++ b/ROOT/exo7/META-INF/context.xml @@ -0,0 +1,2 @@ + diff --git a/ROOT/exo7/form.jsp b/ROOT/exo7/form.jsp new file mode 100644 index 0000000..9b620a8 --- /dev/null +++ b/ROOT/exo7/form.jsp @@ -0,0 +1,13 @@ + + + +
+ First name:
+
+ Last name:
+

+ +
+ + + diff --git a/ROOT/exo7/nextpage.jsp b/ROOT/exo7/nextpage.jsp new file mode 100644 index 0000000..8627414 --- /dev/null +++ b/ROOT/exo7/nextpage.jsp @@ -0,0 +1,5 @@ + + + Bonjour <%= session.getAttribute("theName") %> + + diff --git a/ROOT/exo7/savename.jsp b/ROOT/exo7/savename.jsp new file mode 100644 index 0000000..b790925 --- /dev/null +++ b/ROOT/exo7/savename.jsp @@ -0,0 +1,11 @@ +<% +String firstname = request.getParameter("firstname"); +String lastname = request.getParameter("lastname"); +session.setAttribute("theName", firstname + " " + lastname); +%> + + + + Continue + + -- 2.34.1