teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

jspの内容を一部修正

2018/11/01 23:05

投稿

nyan_engineer
nyan_engineer

スコア30

title CHANGED
File without changes
body CHANGED
@@ -222,4 +222,39 @@
222
222
  </body>
223
223
  </html>
224
224
 
225
+ ```
226
+
227
+ 2018/11/02 追記
228
+ ご回答いただいた内容を受け、jspを一部修正しました。
229
+ ```jsp
230
+ <%@ page language="java" contentType="text/html; charset=UTF-8"
231
+ pageEncoding="UTF-8"%>
232
+ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
233
+ <!DOCTYPE html>
234
+ <html>
235
+ <head>
236
+ <meta charset="UTF-8">
237
+ <title>社員データ</title>
238
+ </head>
239
+ <body>
240
+ 社員データを表示
241
+ <br>
242
+ <table>
243
+ <tr>
244
+ <th>No</th>
245
+ <th>名前</th>
246
+ <th>ひらがな</th>
247
+ </tr>
248
+
249
+ <c:forEach items="${employeeList}" var="emp">
250
+ <tr>
251
+ <td><c:out value="${empList.employee_id}" /></td>
252
+ <td><c:out value="${empList.name}" /></td>
253
+ <td><c:out value="${empList.name_hiragana}" /></td>
254
+ </tr>
255
+ </c:forEach>
256
+
257
+ </table>
258
+ </body>
259
+ </html>
225
260
  ```

1

jspを追加しました

2018/11/01 23:05

投稿

nyan_engineer
nyan_engineer

スコア30

title CHANGED
File without changes
body CHANGED
@@ -189,4 +189,37 @@
189
189
 
190
190
  }
191
191
 
192
+ ```
193
+ ```jsp
194
+ <%@ page language="java" contentType="text/html; charset=UTF-8"
195
+ pageEncoding="UTF-8"%>
196
+ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
197
+ <!DOCTYPE html>
198
+ <html>
199
+ <head>
200
+ <meta charset="UTF-8">
201
+ <title>社員データ</title>
202
+ </head>
203
+ <body>
204
+ 社員データを表示
205
+ <br>
206
+ <table>
207
+ <tr>
208
+ <th>No</th>
209
+ <th>名前</th>
210
+ <th>ひらがな</th>
211
+ </tr>
212
+
213
+ <c:forEach items="${empList}" var="empList">
214
+ <tr>
215
+ <td><c:out value="${empList.employee_id}" /></td>
216
+ <td><c:out value="${empList.name}" /></td>
217
+ <td><c:out value="${empList.name_hiragana}" /></td>
218
+ </tr>
219
+ </c:forEach>
220
+
221
+ </table>
222
+ </body>
223
+ </html>
224
+
192
225
  ```