質問編集履歴
1
servletの変更点
test
CHANGED
File without changes
|
test
CHANGED
@@ -166,8 +166,50 @@
|
|
166
166
|
|
167
167
|
```
|
168
168
|
|
169
|
+
以下servletの変更した部分です
|
170
|
+
|
169
171
|
```java
|
170
172
|
|
173
|
+
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
String title=request.getParameter("title");
|
178
|
+
|
179
|
+
Part part=request.getPart("data");
|
180
|
+
|
181
|
+
String name=part.getSubmittedFileName();
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
File file=new File(name);
|
186
|
+
|
187
|
+
InsertPhotoLogic plogic=new InsertPhotoLogic();
|
188
|
+
|
189
|
+
plogic.execute(title,file);
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
RequestDispatcher dsp=request.getRequestDispatcher("/WEB-INF/jsp/result.jsp");
|
194
|
+
|
195
|
+
dsp.forward(request, response);
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
doGet(request, response);
|
200
|
+
|
201
|
+
}
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
}
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
```
|
210
|
+
|
211
|
+
```java
|
212
|
+
|
171
213
|
package dao;
|
172
214
|
|
173
215
|
|