回答編集履歴
1
誤字の修正
test
CHANGED
@@ -15,8 +15,8 @@
|
|
15
15
|
<body>
|
16
16
|
<h1>メニュー画面</h1>
|
17
17
|
<form action="/tomcatTest/itemlistservlet" method="POST">
|
18
|
-
<button type="submit" value="item_list" name="cl
|
18
|
+
<button type="submit" value="item_list" name="clicked">商品一覧</button>
|
19
|
-
<button type="submit" value="cart" name="cl
|
19
|
+
<button type="submit" value="cart" name="clicked">カート表示</button>
|
20
20
|
</form>
|
21
21
|
</body>
|
22
22
|
</html>
|
@@ -27,7 +27,7 @@
|
|
27
27
|
protected void doPost(HttpServletRequest request, HttpServletResponse response)
|
28
28
|
throws ServletException, IOException {
|
29
29
|
|
30
|
-
switch(request.getParameter("cl
|
30
|
+
switch(request.getParameter("clicked")) {
|
31
31
|
case "item_list" :
|
32
32
|
/* 何かしらの処理 */
|
33
33
|
case "cart" :
|