質問編集履歴
2
コントローラのリクエスト処理する関数の引数の型が誤っていました。MainForm → MainFormIfに修正。これでもダメでしたが
test
CHANGED
File without changes
|
test
CHANGED
@@ -86,7 +86,7 @@
|
|
86
86
|
|
87
87
|
@RequestMapping("/send")
|
88
88
|
|
89
|
-
public String send(@ModelAttribute("MainFormData") MainForm mainFormData) {
|
89
|
+
public String send(@ModelAttribute("MainFormData") MainFormIf mainFormData) {
|
90
90
|
|
91
91
|
System.out.println(mainFormData.getBumon());
|
92
92
|
|
1
web.xmlのソースを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -170,6 +170,42 @@
|
|
170
170
|
|
171
171
|
|
172
172
|
|
173
|
+
**web.xml**
|
174
|
+
|
175
|
+
```xml
|
176
|
+
|
177
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
178
|
+
|
179
|
+
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
180
|
+
|
181
|
+
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
182
|
+
|
183
|
+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
|
184
|
+
|
185
|
+
id="WebApp_ID" version="3.1">
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
<!-- 一部のみ抜粋 -->
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
<servlet-mapping>
|
194
|
+
|
195
|
+
<servlet-name>dispatcherServlet</servlet-name>
|
196
|
+
|
197
|
+
<url-pattern>*.xhtml</url-pattern>
|
198
|
+
|
199
|
+
</servlet-mapping>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
</web-app>
|
204
|
+
|
205
|
+
```
|
206
|
+
|
207
|
+
|
208
|
+
|
173
209
|
### 発生している問題・エラーメッセージ
|
174
210
|
|
175
211
|
MainCtrl.javaの@RequestMapping("/send")の箇所でMainFormから送信されてきたmainFormDataに何も入っていない状態です。(MainForm.htmlの時点ではth:valueに値はセットされているのですが)
|