質問編集履歴

2

追記しました

2018/09/07 01:04

投稿

javava
javava

スコア19

test CHANGED
File without changes
test CHANGED
@@ -135,3 +135,383 @@
135
135
  **追記**
136
136
 
137
137
  [参考サイト](https://stackoverflow.com/questions/32090921/deploying-maven-project-throws-java-util-zip-zipexception-invalid-loc-header-b)
138
+
139
+
140
+
141
+ pom.xml
142
+
143
+ ```
144
+
145
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
146
+
147
+ <modelVersion>4.0.0</modelVersion>
148
+
149
+ <groupId>org.springframework.samples.service.service</groupId>
150
+
151
+ <artifactId>New</artifactId>
152
+
153
+ <version>0.0.1-SNAPSHOT</version>
154
+
155
+ <packaging>war</packaging>
156
+
157
+
158
+
159
+ <properties>
160
+
161
+ <hibernate.version>4.3.10.Final</hibernate.version>
162
+
163
+
164
+
165
+ <!-- Generic properties -->
166
+
167
+ <java.version>1.6</java.version>
168
+
169
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
170
+
171
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
172
+
173
+
174
+
175
+ <!-- Web -->
176
+
177
+ <jsp.version>2.2</jsp.version>
178
+
179
+ <jstl.version>1.2</jstl.version>
180
+
181
+ <servlet.version>2.5</servlet.version>
182
+
183
+
184
+
185
+
186
+
187
+ <!-- Spring -->
188
+
189
+ <spring-framework.version>3.2.3.RELEASE</spring-framework.version>
190
+
191
+
192
+
193
+ <!-- Hibernate / JPA -->
194
+
195
+ <hibernate.version>4.2.1.Final</hibernate.version>
196
+
197
+
198
+
199
+ <!-- Logging -->
200
+
201
+ <logback.version>1.0.13</logback.version>
202
+
203
+ <slf4j.version>1.7.5</slf4j.version>
204
+
205
+
206
+
207
+ <!-- Test -->
208
+
209
+ <junit.version>4.11</junit.version>
210
+
211
+
212
+
213
+ </properties>
214
+
215
+
216
+
217
+
218
+
219
+ <dependencies>
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+ <!-- Spring MVC -->
230
+
231
+ <dependency>
232
+
233
+ <groupId>org.springframework</groupId>
234
+
235
+ <artifactId>spring-webmvc</artifactId>
236
+
237
+ <version>${spring-framework.version}</version>
238
+
239
+ </dependency>
240
+
241
+
242
+
243
+ <!-- Other Web dependencies -->
244
+
245
+ <dependency>
246
+
247
+ <groupId>javax.servlet</groupId>
248
+
249
+ <artifactId>jstl</artifactId>
250
+
251
+ <version>${jstl.version}</version>
252
+
253
+ </dependency>
254
+
255
+ <dependency>
256
+
257
+ <groupId>javax.servlet</groupId>
258
+
259
+ <artifactId>servlet-api</artifactId>
260
+
261
+ <version>${servlet.version}</version>
262
+
263
+ <scope>provided</scope>
264
+
265
+ </dependency>
266
+
267
+ <dependency>
268
+
269
+ <groupId>javax.servlet.jsp</groupId>
270
+
271
+ <artifactId>jsp-api</artifactId>
272
+
273
+ <version>${jsp.version}</version>
274
+
275
+ <scope>provided</scope>
276
+
277
+ </dependency>
278
+
279
+
280
+
281
+ <!-- Spring and Transactions -->
282
+
283
+ <dependency>
284
+
285
+ <groupId>org.springframework</groupId>
286
+
287
+ <artifactId>spring-tx</artifactId>
288
+
289
+ <version>${spring-framework.version}</version>
290
+
291
+ </dependency>
292
+
293
+
294
+
295
+ <!-- Logging with SLF4J & LogBack -->
296
+
297
+ <dependency>
298
+
299
+ <groupId>org.slf4j</groupId>
300
+
301
+ <artifactId>slf4j-api</artifactId>
302
+
303
+ <version>${slf4j.version}</version>
304
+
305
+ <scope>compile</scope>
306
+
307
+ </dependency>
308
+
309
+ <dependency>
310
+
311
+ <groupId>ch.qos.logback</groupId>
312
+
313
+ <artifactId>logback-classic</artifactId>
314
+
315
+ <version>${logback.version}</version>
316
+
317
+ <scope>runtime</scope>
318
+
319
+ </dependency>
320
+
321
+
322
+
323
+ <!-- Hibernate -->
324
+
325
+ <dependency>
326
+
327
+ <groupId>org.hibernate</groupId>
328
+
329
+ <artifactId>hibernate-entitymanager</artifactId>
330
+
331
+ <version>${hibernate.version}</version>
332
+
333
+ </dependency>
334
+
335
+
336
+
337
+
338
+
339
+ <!-- Test Artifacts -->
340
+
341
+ <dependency>
342
+
343
+ <groupId>org.springframework</groupId>
344
+
345
+ <artifactId>spring-test</artifactId>
346
+
347
+ <version>${spring-framework.version}</version>
348
+
349
+ <scope>test</scope>
350
+
351
+ </dependency>
352
+
353
+ <dependency>
354
+
355
+ <groupId>junit</groupId>
356
+
357
+ <artifactId>junit</artifactId>
358
+
359
+ <version>${junit.version}</version>
360
+
361
+ <scope>test</scope>
362
+
363
+ </dependency>
364
+
365
+
366
+
367
+ <!-- Hibernate -->
368
+
369
+ <dependency>
370
+
371
+ <groupId>org.hibernate</groupId>
372
+
373
+ <artifactId>hibernate-entitymanager</artifactId>
374
+
375
+ <version>${hibernate.version}</version>
376
+
377
+ </dependency>
378
+
379
+ <dependency>
380
+
381
+ <groupId>org.springframework</groupId>
382
+
383
+ <artifactId>spring-jdbc</artifactId>
384
+
385
+ <version>4.2.5.RELEASE</version>
386
+
387
+ </dependency>
388
+
389
+ <dependency>
390
+
391
+ <groupId>org.springframework.data</groupId>
392
+
393
+ <artifactId>spring-data-jpa</artifactId>
394
+
395
+ <version>1.8.1.RELEASE</version>
396
+
397
+ </dependency>
398
+
399
+
400
+
401
+ <!-- db connection -->
402
+
403
+ <dependency>
404
+
405
+ <groupId>commons-dbcp</groupId>
406
+
407
+ <artifactId>commons-dbcp</artifactId>
408
+
409
+ <version>1.4</version>
410
+
411
+ </dependency>
412
+
413
+ <dependency>
414
+
415
+ <groupId>mysql</groupId>
416
+
417
+ <artifactId>mysql-connector-java</artifactId>
418
+
419
+ <version>5.1.38</version>
420
+
421
+ </dependency>
422
+
423
+
424
+
425
+ <!-- 追加 -->
426
+
427
+ <dependency>
428
+
429
+ <groupId>javax.validation</groupId>
430
+
431
+ <artifactId>validation-api</artifactId>
432
+
433
+ <version>2.0.1.Final</version>
434
+
435
+ </dependency>
436
+
437
+ <dependency>
438
+
439
+ <groupId>org.hibernate</groupId>
440
+
441
+ <artifactId>hibernate-validator</artifactId>
442
+
443
+ <version>5.2.4.Final</version>
444
+
445
+ </dependency>
446
+
447
+ </dependencies>
448
+
449
+ </project>
450
+
451
+
452
+
453
+ ```
454
+
455
+
456
+
457
+ 例外がなげられるjspファイル
458
+
459
+ ```html
460
+
461
+ <!DOCTYPE html>
462
+
463
+
464
+
465
+ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
466
+
467
+
468
+
469
+ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
470
+
471
+ <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
472
+
473
+ <%@ taglib prefix="f" uri="http://www.springframework.org/tags/form"%>
474
+
475
+
476
+
477
+ <html>
478
+
479
+ <head>
480
+
481
+ <meta charset="utf-8">
482
+
483
+ <title>Welcome</title>
484
+
485
+ </head>
486
+
487
+ <body>
488
+
489
+ <f:form modelAttribute="loginForm" action="login" method="POST">
490
+
491
+ <div>
492
+
493
+ ユーザ名:<input type="text" id="loginName" name="loginName">
494
+
495
+ </div>
496
+
497
+ <div>
498
+
499
+ パスワード:<input type="text" id="loginPassword" name="loginPassword">
500
+
501
+ </div>
502
+
503
+ <div>
504
+
505
+ <input type="submit" value="ログイン">
506
+
507
+ </div>
508
+
509
+ </f:form>
510
+
511
+ </body>
512
+
513
+ </html>
514
+
515
+
516
+
517
+ ```

1

参考サイトの追記

2018/09/07 01:04

投稿

javava
javava

スコア19

test CHANGED
File without changes
test CHANGED
@@ -131,3 +131,7 @@
131
131
 
132
132
 
133
133
  よろしくお願いします。
134
+
135
+ **追記**
136
+
137
+ [参考サイト](https://stackoverflow.com/questions/32090921/deploying-maven-project-throws-java-util-zip-zipexception-invalid-loc-header-b)