質問編集履歴
1
コードを記載しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,6 +22,8 @@
|
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
+
Main.java
|
26
|
+
|
25
27
|
```java
|
26
28
|
|
27
29
|
package servlet;
|
@@ -214,6 +216,8 @@
|
|
214
216
|
|
215
217
|
```
|
216
218
|
|
219
|
+
loginResult.jsp
|
220
|
+
|
217
221
|
```jsp
|
218
222
|
|
219
223
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
@@ -268,6 +272,82 @@
|
|
268
272
|
|
269
273
|
```
|
270
274
|
|
275
|
+
main.jsp
|
276
|
+
|
277
|
+
```jsp
|
278
|
+
|
279
|
+
<%@ page language="java" contentType="text/html; charset= UTF-8"
|
280
|
+
|
281
|
+
pageEncoding="UTF-8" %>
|
282
|
+
|
283
|
+
<%@ page import ="model.User,model.Mutter,java.util.List" %>
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
<%
|
288
|
+
|
289
|
+
User loginUser = (User)session.getAttribute("loginUser");
|
290
|
+
|
291
|
+
List<Mutter> mutterList =
|
292
|
+
|
293
|
+
(List<Mutter>) application.getAttribute("mutterList");
|
294
|
+
|
295
|
+
String errorMsg =(String) request.getAttribute("errorMsg");
|
296
|
+
|
297
|
+
%>
|
298
|
+
|
299
|
+
<!DOCTYPE html>
|
300
|
+
|
301
|
+
<html>
|
302
|
+
|
303
|
+
<head>
|
304
|
+
|
305
|
+
<meta charset="UTF-8">
|
306
|
+
|
307
|
+
<title>役員報告</title>
|
308
|
+
|
309
|
+
</head>
|
310
|
+
|
311
|
+
<body>
|
312
|
+
|
313
|
+
<h1>役員報告</h1>
|
314
|
+
|
315
|
+
<p>
|
316
|
+
|
317
|
+
<%= loginUser.getName() %>さん、ログイン中
|
318
|
+
|
319
|
+
<a href="/yakuin/Logout">ログアウト</a>
|
320
|
+
|
321
|
+
</p>
|
322
|
+
|
323
|
+
<p><a href="/yakuin/Main">更新</a></p>
|
324
|
+
|
325
|
+
<form action="/yakuin/Main" method="post">
|
326
|
+
|
327
|
+
<input type="text" name="text">
|
328
|
+
|
329
|
+
<input type="submit" value="報告">
|
330
|
+
|
331
|
+
</form>
|
332
|
+
|
333
|
+
<% if(errorMsg != null){ %>
|
334
|
+
|
335
|
+
<p><%= errorMsg %></p>
|
336
|
+
|
337
|
+
<% } %>
|
338
|
+
|
339
|
+
<% for(Mutter mutter:mutterList){ %>
|
340
|
+
|
341
|
+
<p><%= mutter.getUserName() %>:<%= mutter.getText() %></p>
|
342
|
+
|
343
|
+
<% } %>
|
344
|
+
|
345
|
+
</body>
|
346
|
+
|
347
|
+
</html>
|
348
|
+
|
349
|
+
```
|
350
|
+
|
271
351
|
|
272
352
|
|
273
353
|
### 試したこと
|