repositories
/
TD_webapps.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
exo7: add cookies handling code.
[TD_webapps.git]
/
ROOT
/
exo7
/
viewcookie.jsp
diff --git a/ROOT/exo7/viewcookie.jsp
b/ROOT/exo7/viewcookie.jsp
new file mode 100644
(file)
index 0000000..
2a705f6
--- /dev/null
+++ b/
ROOT/exo7/viewcookie.jsp
@@ -0,0
+1,13
@@
+<% Cookie[] cookies = request.getCookies(); %>
+
+<html>
+ <body>
+ Bonjour <br>
+ <%
+ for(int i = 0; i < cookies.length; i++) {
+ Cookie c = cookies[i];
+ out.println(c.getName() + " = " + c.getValue() + " <br>");
+ }
+ %>
+ </body>
+</html>