質問編集履歴
1
コードを修正しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,31 +10,109 @@
|
|
10
10
|
|
11
11
|
なぜ、ArrayListを型に解決できないのでしょうか。
|
12
12
|
|
13
|
+
→pageディレクティブを改善したら、エラーが取れました。
|
14
|
+
|
15
|
+
しかし、今度はGyomuが解決できません。と出ます。
|
16
|
+
|
17
|
+
エラー:JSPファイル: [/WEB-INF/ListScreen.jsp] の中の[18]行目でエラーが発生しました
|
18
|
+
|
19
|
+
エラー:JSPファイル: [/WEB-INF/ListScreen.jsp] の中の[22]行目でエラーが発生しました
|
20
|
+
|
21
|
+
|
22
|
+
|
13
23
|
|
14
24
|
|
15
25
|
```java
|
16
26
|
|
27
|
+
package servlet;
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
import java.io.IOException;
|
32
|
+
|
33
|
+
import java.util.List;
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
import javax.servlet.RequestDispatcher;
|
38
|
+
|
39
|
+
import javax.servlet.ServletException;
|
40
|
+
|
41
|
+
import javax.servlet.annotation.WebServlet;
|
42
|
+
|
43
|
+
import javax.servlet.http.HttpServlet;
|
44
|
+
|
45
|
+
import javax.servlet.http.HttpServletRequest;
|
46
|
+
|
47
|
+
import javax.servlet.http.HttpServletResponse;
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
import model.GetGyomuhokokuListLogic;
|
52
|
+
|
53
|
+
import model.Gyomu;
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
@WebServlet("/ListScreen")
|
58
|
+
|
59
|
+
public class ListScreen extends HttpServlet {
|
60
|
+
|
61
|
+
private static final long serialVersionUID = 1L;
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
protected void doPost(HttpServletRequest request,
|
66
|
+
|
67
|
+
HttpServletResponse response)
|
68
|
+
|
69
|
+
throws ServletException, IOException {
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
GetGyomuhokokuListLogic getGyomuhokokuListLogic = new GetGyomuhokokuListLogic();
|
74
|
+
|
75
|
+
List<Gyomu> gyomuList = getGyomuhokokuListLogic.execute();
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
request.setAttribute("gyomuList", gyomuList);
|
82
|
+
|
83
|
+
RequestDispatcher dispatcher = request.getRequestDispatcher("/WEB-INF/ListScreen.jsp");
|
84
|
+
|
85
|
+
dispatcher.forward(request, response);
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
}
|
94
|
+
|
95
|
+
}
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
```
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
```java
|
104
|
+
|
105
|
+
|
106
|
+
|
17
|
-
ListScreen.j
|
107
|
+
ListScreen.jsp
|
108
|
+
|
18
|
-
|
109
|
+
<%@ page language="java"
|
110
|
+
|
19
|
-
|
111
|
+
contentType="text/html; charset=UTF-8"
|
20
|
-
|
112
|
+
|
21
|
-
|
113
|
+
pageEncoding="UTF-8"
|
22
|
-
|
114
|
+
|
23
|
-
|
115
|
+
import="java.util.ArrayList"
|
24
|
-
|
25
|
-
page import="java.util.ArrayList"
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
page language="java" contentType="text/html; charset=Windows-31J"
|
30
|
-
|
31
|
-
pageEncoding="Windows-31J"
|
32
|
-
|
33
|
-
page import="java.util.ArrayList"
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
116
|
|
39
117
|
%>
|
40
118
|
|
@@ -132,84 +210,6 @@
|
|
132
210
|
|
133
211
|
</html>
|
134
212
|
|
213
|
+
|
214
|
+
|
135
215
|
```
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
```java
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
ListScreen.jsp
|
144
|
-
|
145
|
-
package servlet;
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
import java.io.IOException;
|
150
|
-
|
151
|
-
import java.util.List;
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
import javax.servlet.RequestDispatcher;
|
156
|
-
|
157
|
-
import javax.servlet.ServletException;
|
158
|
-
|
159
|
-
import javax.servlet.annotation.WebServlet;
|
160
|
-
|
161
|
-
import javax.servlet.http.HttpServlet;
|
162
|
-
|
163
|
-
import javax.servlet.http.HttpServletRequest;
|
164
|
-
|
165
|
-
import javax.servlet.http.HttpServletResponse;
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
import model.GetGyomuhokokuListLogic;
|
170
|
-
|
171
|
-
import model.Gyomu;
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
@WebServlet("/ListScreen")
|
176
|
-
|
177
|
-
public class ListScreen extends HttpServlet {
|
178
|
-
|
179
|
-
private static final long serialVersionUID = 1L;
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
protected void doGet(HttpServletRequest request,
|
184
|
-
|
185
|
-
HttpServletResponse response)
|
186
|
-
|
187
|
-
throws ServletException, IOException {
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
GetGyomuhokokuListLogic getGyomuhokokuListLogic = new GetGyomuhokokuListLogic();
|
192
|
-
|
193
|
-
List<Gyomu> gyomuList = getGyomuhokokuListLogic.execute();
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
request.setAttribute("gyomuList", gyomuList);
|
200
|
-
|
201
|
-
RequestDispatcher dispatcher = request.getRequestDispatcher("/WEB-INF/Login.jsp");
|
202
|
-
|
203
|
-
dispatcher.forward(request, response);
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
}
|
212
|
-
|
213
|
-
}
|
214
|
-
|
215
|
-
```
|