質問編集履歴
1
質問のソースコードが崩れていた為に<code>を使用して修正を行いました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,6 +32,8 @@
|
|
32
32
|
|
33
33
|
■■■HelloWorld.java■■■
|
34
34
|
|
35
|
+
```ここに言語を入力
|
36
|
+
|
35
37
|
package sampleServletProj;
|
36
38
|
|
37
39
|
|
@@ -40,6 +42,8 @@
|
|
40
42
|
|
41
43
|
import java.io.PrintWriter;
|
42
44
|
|
45
|
+
|
46
|
+
|
43
47
|
import javax.servlet.ServletException;
|
44
48
|
|
45
49
|
import javax.servlet.http.HttpServletRequest;
|
@@ -50,16 +54,24 @@
|
|
50
54
|
|
51
55
|
public class HelloWorld extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
|
52
56
|
|
57
|
+
|
58
|
+
|
53
59
|
public HelloWorld() {
|
54
60
|
|
55
61
|
super();
|
56
62
|
|
57
63
|
}
|
58
64
|
|
65
|
+
|
66
|
+
|
59
67
|
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
60
68
|
|
69
|
+
|
70
|
+
|
61
71
|
}
|
62
72
|
|
73
|
+
|
74
|
+
|
63
75
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
64
76
|
|
65
77
|
response.setContentType("text/html;charset=iso-2022-jp");
|
@@ -126,7 +138,7 @@
|
|
126
138
|
|
127
139
|
out.println("情報を修正する場合は以下の戻るボタンを押してください。");
|
128
140
|
|
129
|
-
out.println("<FORM method=\"GET\" action=\"./
|
141
|
+
out.println("<FORM method=\"GET\" action=\"./index.html\">");
|
130
142
|
|
131
143
|
out.println("<INPUT type=\"submit\" value=\"戻る\">");
|
132
144
|
|
@@ -146,8 +158,12 @@
|
|
146
158
|
|
147
159
|
|
148
160
|
|
161
|
+
```
|
162
|
+
|
149
163
|
■■■index.htnl■■■
|
150
164
|
|
165
|
+
```ここに言語を入力
|
166
|
+
|
151
167
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
152
168
|
|
153
169
|
<html>
|
@@ -210,10 +226,14 @@
|
|
210
226
|
|
211
227
|
</html>
|
212
228
|
|
229
|
+
```
|
230
|
+
|
213
231
|
|
214
232
|
|
215
233
|
■■■web.xml■■■
|
216
234
|
|
235
|
+
```ここに言語を入力
|
236
|
+
|
217
237
|
<?xml version="1.0" encoding="UTF-8"?>
|
218
238
|
|
219
239
|
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
|
@@ -244,6 +264,8 @@
|
|
244
264
|
|
245
265
|
</web-app>
|
246
266
|
|
267
|
+
```
|
268
|
+
|
247
269
|
|
248
270
|
|
249
271
|
### 試したこと
|