質問編集履歴

2

ひとまず修正したJSPを追記しました。

2019/07/18 06:53

投稿

ryoga4869
ryoga4869

スコア17

test CHANGED
File without changes
test CHANGED
@@ -157,3 +157,113 @@
157
157
  質問が多く長々と書いてしましましたが、不足している点は修正させて頂きますので
158
158
 
159
159
  何卒よろしくお願い申し上げます。
160
+
161
+
162
+
163
+ 修正したJSPです
164
+
165
+ ```
166
+
167
+ <form action="<%=request.getContextPath()%>/Main" method="post">
168
+
169
+ <table class="up">
170
+
171
+ <tr>
172
+
173
+ <th>NO.</th>
174
+
175
+ <th>お名前</th>
176
+
177
+ <th>携帯電話番号</th>
178
+
179
+ <th>性別</th>
180
+
181
+ <th class="hide"></th>
182
+
183
+ </tr>
184
+
185
+ <tr>
186
+
187
+ <td><input type="number" name="id" value=" " disabled="disabled" style=background-color:#ffe0ed ></td>
188
+
189
+ <td><input type="text" maxlength="20" name="name" placeholder="20字以内で名前を入力"></td>
190
+
191
+ <td><input type="tel" name="tel" pattern="[0-9]{3}-[0-9]{4}-[0-9]{4}" placeholder="090-1234-5678(半角数字で入力)"></td>
192
+
193
+ <td><select name="gender">
194
+
195
+ <option value=""> </option>
196
+
197
+ <option value="1">男性</option>
198
+
199
+ <option value="2">女性</option>
200
+
201
+ <option value="3">その他</option></select></td>
202
+
203
+ <td><input type="submit" value="新規登録" style="border:2px solid #7b3cff; background-color:#ffd700" onmouseover="this.style.background='#ffff00'" onmouseout="this.style.background='#ffd700' class="up-butt"></td>
204
+
205
+ </tr>
206
+
207
+ <tr><td align="left" style="border:2px solid #fcc2c8; background-color:#ffe0ed; color:#ff69b4; font-size: 20px" colspan="4"> メッセージ:</td>
208
+
209
+ </tr>
210
+
211
+ </table>
212
+
213
+ </form>
214
+
215
+ <table class="dow">
216
+
217
+ <thead>
218
+
219
+ <tr>
220
+
221
+ <th>NO.</th>
222
+
223
+ <th>お名前</th>
224
+
225
+ <th>携帯電話番号</th>
226
+
227
+ <th>性別</th>
228
+
229
+ <th class="hide"></th>
230
+
231
+ </tr>
232
+
233
+ </thead>
234
+
235
+ <tbody>
236
+
237
+ <c:forEach var="mutterList" items="${mutterList}">
238
+
239
+ <tr>
240
+
241
+ <td><c:out value="${mutterList.id}" /></td>
242
+
243
+ <td><c:out value="${mutterList.name}"/></td>
244
+
245
+ <td><c:out value="${mutterList.tel}"/></td>
246
+
247
+ <td><c:out value="${mutterList.gender}"/></td>
248
+
249
+ <td><input type="button" value="更新" style="border:2px solid #32cd32; background-color:#32cd32" onmouseover="this.style.background='#00ff00'" onmouseout="this.style.background='#32cd32'" onclick="location:href='<%=request.getContextPath()%>/Update?id=${mutterList.id}'" class="update" name="update"></td>
250
+
251
+ <td><input type="button" value="削除" style="border:2px solid #ff6347; background-color:#ff6347" onmouseover="this.style.background='#ff0000'" onmouseout="this.style.background='#ff6347'" onclick="location:href='./.delete.java'"class="delete" name="delete"></td>
252
+
253
+ </tr>
254
+
255
+ </c:forEach>
256
+
257
+ </tbody>
258
+
259
+ </table>
260
+
261
+ </body>
262
+
263
+ </html>
264
+
265
+ ```
266
+
267
+ このように修正してみましたがやはりボタンとしての機能はありません。
268
+
269
+ まだ画面遷移のURLが間違っているという事でしょうか?

1

④について私なりの考えを書き足しました

2019/07/18 06:53

投稿

ryoga4869
ryoga4869

スコア17

test CHANGED
File without changes
test CHANGED
@@ -35,6 +35,8 @@
35
35
 
36
36
 
37
37
  ④この画面の次画面でUpdateしたい内容をformに入力して頂く際に初期値として選択したレコードをformに入力しますが、formの欄の下にはこの画面と同様に一覧を表示しておりますので2種類のselect文を実行することになるのですが、この場合2種類のデータを別のArrayListに保管し表示することは可能なのでしょうか?
38
+
39
+ それとも指定したレコードの詳細を取得し表示することが出来るのでしょうか?
38
40
 
39
41
  ```
40
42