質問編集履歴
2
見やすさの変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -120,23 +120,21 @@
|
|
120
120
|
|
121
121
|
|
122
122
|
|
123
|
-
|
123
|
+
//LoginLogicを使ってmutterListを取得
|
124
|
-
|
124
|
+
|
125
|
-
|
125
|
+
LoginLogic loginLogic=new LoginLogic();
|
126
|
-
|
127
|
-
|
128
|
-
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
-
|
129
|
+
List<Mutter>mutterList=loginLogic.execute(user);
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
-
|
135
|
+
if(mutterList.size()!=0){
|
136
|
-
|
137
|
-
|
138
|
-
|
136
|
+
|
139
|
-
request.setAttribute("setErrorMsg","すでに登録されています。");
|
137
|
+
request.setAttribute("setErrorMsg","すでに登録されています。");
|
140
138
|
|
141
139
|
|
142
140
|
|
@@ -148,11 +146,9 @@
|
|
148
146
|
|
149
147
|
//mutter1とする
|
150
148
|
|
151
|
-
|
149
|
+
for(Mutter mutter1:mutterList){
|
152
|
-
|
150
|
+
|
153
|
-
|
151
|
+
if(mutter1.getUserName().length()!=0||mutter1.getUserPass().length()!=0){
|
154
|
-
|
155
|
-
|
156
152
|
|
157
153
|
request.setAttribute("setErrorMsg", "すでに登録されています。");
|
158
154
|
|
@@ -164,29 +160,29 @@
|
|
164
160
|
|
165
161
|
|
166
162
|
|
167
|
-
|
163
|
+
}else{
|
168
|
-
|
164
|
+
|
169
|
-
|
165
|
+
HttpSession session=request.getSession();
|
170
|
-
|
166
|
+
|
171
|
-
|
167
|
+
session.setAttribute("loginUser",user);
|
172
|
-
|
173
|
-
|
174
|
-
|
168
|
+
|
169
|
+
|
170
|
+
|
175
|
-
User loginUser=(User)session.getAttribute("loginUser");
|
171
|
+
User loginUser=(User)session.getAttribute("loginUser");
|
176
|
-
|
177
|
-
|
178
|
-
|
172
|
+
|
173
|
+
|
174
|
+
|
179
|
-
Mutter mutter=new Mutter(loginUser.getName(),loginUser.getPass());
|
175
|
+
Mutter mutter=new Mutter(loginUser.getName(),loginUser.getPass());
|
180
|
-
|
176
|
+
|
181
|
-
SetLogic setLogic=new SetLogic();
|
177
|
+
SetLogic setLogic=new SetLogic();
|
182
|
-
|
183
|
-
|
184
|
-
|
178
|
+
|
179
|
+
|
180
|
+
|
185
|
-
|
181
|
+
try{
|
186
182
|
|
187
183
|
setLogic.execute(mutter);
|
188
184
|
|
189
|
-
|
185
|
+
}catch(ClassNotFoundException e){
|
190
186
|
|
191
187
|
e.printStackTrace();
|
192
188
|
|
@@ -194,16 +190,16 @@
|
|
194
190
|
|
195
191
|
|
196
192
|
|
197
|
-
RequestDispatcher dispatcher=request.getRequestDispatcher("/WEB-INF/jsp/setResult.jsp");
|
193
|
+
RequestDispatcher dispatcher=request.getRequestDispatcher("/WEB-INF/jsp/setResult.jsp");
|
198
|
-
|
194
|
+
|
199
|
-
dispatcher.forward(request, response);
|
195
|
+
dispatcher.forward(request, response);
|
200
196
|
|
201
197
|
}
|
202
198
|
|
199
|
+
}
|
200
|
+
|
203
201
|
}
|
204
202
|
|
205
|
-
}
|
206
|
-
|
207
203
|
}
|
208
204
|
|
209
205
|
|
1
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -98,11 +98,11 @@
|
|
98
98
|
|
99
99
|
|
100
100
|
|
101
|
-
|
101
|
+
|
102
102
|
|
103
103
|
User user=new User(name,pass);
|
104
104
|
|
105
|
-
|
105
|
+
|
106
106
|
|
107
107
|
if(name.length()==0 || pass.length()==0){
|
108
108
|
|
@@ -182,8 +182,6 @@
|
|
182
182
|
|
183
183
|
|
184
184
|
|
185
|
-
//ここのsetLogic.execute(mutter)をやる前に、DAOのfindAll()で取得 新しいの作ったほうがいい?
|
186
|
-
|
187
185
|
try{
|
188
186
|
|
189
187
|
setLogic.execute(mutter);
|