質問編集履歴
1
servletの変更点
title
CHANGED
File without changes
|
body
CHANGED
@@ -82,7 +82,28 @@
|
|
82
82
|
}
|
83
83
|
|
84
84
|
```
|
85
|
+
以下servletの変更した部分です
|
85
86
|
```java
|
87
|
+
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
88
|
+
|
89
|
+
String title=request.getParameter("title");
|
90
|
+
Part part=request.getPart("data");
|
91
|
+
String name=part.getSubmittedFileName();
|
92
|
+
|
93
|
+
File file=new File(name);
|
94
|
+
InsertPhotoLogic plogic=new InsertPhotoLogic();
|
95
|
+
plogic.execute(title,file);
|
96
|
+
|
97
|
+
RequestDispatcher dsp=request.getRequestDispatcher("/WEB-INF/jsp/result.jsp");
|
98
|
+
dsp.forward(request, response);
|
99
|
+
|
100
|
+
doGet(request, response);
|
101
|
+
}
|
102
|
+
|
103
|
+
}
|
104
|
+
|
105
|
+
```
|
106
|
+
```java
|
86
107
|
package dao;
|
87
108
|
|
88
109
|
import java.io.File;
|