質問編集履歴
2
追記しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -66,4 +66,194 @@
|
|
66
66
|
|
67
67
|
よろしくお願いします。
|
68
68
|
**追記**
|
69
|
-
[参考サイト](https://stackoverflow.com/questions/32090921/deploying-maven-project-throws-java-util-zip-zipexception-invalid-loc-header-b)
|
69
|
+
[参考サイト](https://stackoverflow.com/questions/32090921/deploying-maven-project-throws-java-util-zip-zipexception-invalid-loc-header-b)
|
70
|
+
|
71
|
+
pom.xml
|
72
|
+
```
|
73
|
+
<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">
|
74
|
+
<modelVersion>4.0.0</modelVersion>
|
75
|
+
<groupId>org.springframework.samples.service.service</groupId>
|
76
|
+
<artifactId>New</artifactId>
|
77
|
+
<version>0.0.1-SNAPSHOT</version>
|
78
|
+
<packaging>war</packaging>
|
79
|
+
|
80
|
+
<properties>
|
81
|
+
<hibernate.version>4.3.10.Final</hibernate.version>
|
82
|
+
|
83
|
+
<!-- Generic properties -->
|
84
|
+
<java.version>1.6</java.version>
|
85
|
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
86
|
+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
87
|
+
|
88
|
+
<!-- Web -->
|
89
|
+
<jsp.version>2.2</jsp.version>
|
90
|
+
<jstl.version>1.2</jstl.version>
|
91
|
+
<servlet.version>2.5</servlet.version>
|
92
|
+
|
93
|
+
|
94
|
+
<!-- Spring -->
|
95
|
+
<spring-framework.version>3.2.3.RELEASE</spring-framework.version>
|
96
|
+
|
97
|
+
<!-- Hibernate / JPA -->
|
98
|
+
<hibernate.version>4.2.1.Final</hibernate.version>
|
99
|
+
|
100
|
+
<!-- Logging -->
|
101
|
+
<logback.version>1.0.13</logback.version>
|
102
|
+
<slf4j.version>1.7.5</slf4j.version>
|
103
|
+
|
104
|
+
<!-- Test -->
|
105
|
+
<junit.version>4.11</junit.version>
|
106
|
+
|
107
|
+
</properties>
|
108
|
+
|
109
|
+
|
110
|
+
<dependencies>
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
<!-- Spring MVC -->
|
116
|
+
<dependency>
|
117
|
+
<groupId>org.springframework</groupId>
|
118
|
+
<artifactId>spring-webmvc</artifactId>
|
119
|
+
<version>${spring-framework.version}</version>
|
120
|
+
</dependency>
|
121
|
+
|
122
|
+
<!-- Other Web dependencies -->
|
123
|
+
<dependency>
|
124
|
+
<groupId>javax.servlet</groupId>
|
125
|
+
<artifactId>jstl</artifactId>
|
126
|
+
<version>${jstl.version}</version>
|
127
|
+
</dependency>
|
128
|
+
<dependency>
|
129
|
+
<groupId>javax.servlet</groupId>
|
130
|
+
<artifactId>servlet-api</artifactId>
|
131
|
+
<version>${servlet.version}</version>
|
132
|
+
<scope>provided</scope>
|
133
|
+
</dependency>
|
134
|
+
<dependency>
|
135
|
+
<groupId>javax.servlet.jsp</groupId>
|
136
|
+
<artifactId>jsp-api</artifactId>
|
137
|
+
<version>${jsp.version}</version>
|
138
|
+
<scope>provided</scope>
|
139
|
+
</dependency>
|
140
|
+
|
141
|
+
<!-- Spring and Transactions -->
|
142
|
+
<dependency>
|
143
|
+
<groupId>org.springframework</groupId>
|
144
|
+
<artifactId>spring-tx</artifactId>
|
145
|
+
<version>${spring-framework.version}</version>
|
146
|
+
</dependency>
|
147
|
+
|
148
|
+
<!-- Logging with SLF4J & LogBack -->
|
149
|
+
<dependency>
|
150
|
+
<groupId>org.slf4j</groupId>
|
151
|
+
<artifactId>slf4j-api</artifactId>
|
152
|
+
<version>${slf4j.version}</version>
|
153
|
+
<scope>compile</scope>
|
154
|
+
</dependency>
|
155
|
+
<dependency>
|
156
|
+
<groupId>ch.qos.logback</groupId>
|
157
|
+
<artifactId>logback-classic</artifactId>
|
158
|
+
<version>${logback.version}</version>
|
159
|
+
<scope>runtime</scope>
|
160
|
+
</dependency>
|
161
|
+
|
162
|
+
<!-- Hibernate -->
|
163
|
+
<dependency>
|
164
|
+
<groupId>org.hibernate</groupId>
|
165
|
+
<artifactId>hibernate-entitymanager</artifactId>
|
166
|
+
<version>${hibernate.version}</version>
|
167
|
+
</dependency>
|
168
|
+
|
169
|
+
|
170
|
+
<!-- Test Artifacts -->
|
171
|
+
<dependency>
|
172
|
+
<groupId>org.springframework</groupId>
|
173
|
+
<artifactId>spring-test</artifactId>
|
174
|
+
<version>${spring-framework.version}</version>
|
175
|
+
<scope>test</scope>
|
176
|
+
</dependency>
|
177
|
+
<dependency>
|
178
|
+
<groupId>junit</groupId>
|
179
|
+
<artifactId>junit</artifactId>
|
180
|
+
<version>${junit.version}</version>
|
181
|
+
<scope>test</scope>
|
182
|
+
</dependency>
|
183
|
+
|
184
|
+
<!-- Hibernate -->
|
185
|
+
<dependency>
|
186
|
+
<groupId>org.hibernate</groupId>
|
187
|
+
<artifactId>hibernate-entitymanager</artifactId>
|
188
|
+
<version>${hibernate.version}</version>
|
189
|
+
</dependency>
|
190
|
+
<dependency>
|
191
|
+
<groupId>org.springframework</groupId>
|
192
|
+
<artifactId>spring-jdbc</artifactId>
|
193
|
+
<version>4.2.5.RELEASE</version>
|
194
|
+
</dependency>
|
195
|
+
<dependency>
|
196
|
+
<groupId>org.springframework.data</groupId>
|
197
|
+
<artifactId>spring-data-jpa</artifactId>
|
198
|
+
<version>1.8.1.RELEASE</version>
|
199
|
+
</dependency>
|
200
|
+
|
201
|
+
<!-- db connection -->
|
202
|
+
<dependency>
|
203
|
+
<groupId>commons-dbcp</groupId>
|
204
|
+
<artifactId>commons-dbcp</artifactId>
|
205
|
+
<version>1.4</version>
|
206
|
+
</dependency>
|
207
|
+
<dependency>
|
208
|
+
<groupId>mysql</groupId>
|
209
|
+
<artifactId>mysql-connector-java</artifactId>
|
210
|
+
<version>5.1.38</version>
|
211
|
+
</dependency>
|
212
|
+
|
213
|
+
<!-- 追加 -->
|
214
|
+
<dependency>
|
215
|
+
<groupId>javax.validation</groupId>
|
216
|
+
<artifactId>validation-api</artifactId>
|
217
|
+
<version>2.0.1.Final</version>
|
218
|
+
</dependency>
|
219
|
+
<dependency>
|
220
|
+
<groupId>org.hibernate</groupId>
|
221
|
+
<artifactId>hibernate-validator</artifactId>
|
222
|
+
<version>5.2.4.Final</version>
|
223
|
+
</dependency>
|
224
|
+
</dependencies>
|
225
|
+
</project>
|
226
|
+
|
227
|
+
```
|
228
|
+
|
229
|
+
例外がなげられるjspファイル
|
230
|
+
```html
|
231
|
+
<!DOCTYPE html>
|
232
|
+
|
233
|
+
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
234
|
+
|
235
|
+
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
236
|
+
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
237
|
+
<%@ taglib prefix="f" uri="http://www.springframework.org/tags/form"%>
|
238
|
+
|
239
|
+
<html>
|
240
|
+
<head>
|
241
|
+
<meta charset="utf-8">
|
242
|
+
<title>Welcome</title>
|
243
|
+
</head>
|
244
|
+
<body>
|
245
|
+
<f:form modelAttribute="loginForm" action="login" method="POST">
|
246
|
+
<div>
|
247
|
+
ユーザ名:<input type="text" id="loginName" name="loginName">
|
248
|
+
</div>
|
249
|
+
<div>
|
250
|
+
パスワード:<input type="text" id="loginPassword" name="loginPassword">
|
251
|
+
</div>
|
252
|
+
<div>
|
253
|
+
<input type="submit" value="ログイン">
|
254
|
+
</div>
|
255
|
+
</f:form>
|
256
|
+
</body>
|
257
|
+
</html>
|
258
|
+
|
259
|
+
```
|
1
参考サイトの追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -64,4 +64,6 @@
|
|
64
64
|
|
65
65
|
```
|
66
66
|
|
67
|
-
よろしくお願いします。
|
67
|
+
よろしくお願いします。
|
68
|
+
**追記**
|
69
|
+
[参考サイト](https://stackoverflow.com/questions/32090921/deploying-maven-project-throws-java-util-zip-zipexception-invalid-loc-header-b)
|