質問編集履歴

2

文章の修正

2020/04/22 07:27

投稿

MrLonginus
MrLonginus

スコア11

test CHANGED
File without changes
test CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- Struts2でログイン画面を実装したいです。
5
+ Struts2でログイン画面を実装したいです。しかし「Run on server」しても404になります
6
6
 
7
7
  参考サイト
8
8
 

1

エラーメッセージの追加

2020/04/22 07:27

投稿

MrLonginus
MrLonginus

スコア11

test CHANGED
File without changes
test CHANGED
@@ -12,385 +12,207 @@
12
12
 
13
13
  ![![](031ae302068b4ba6953e6ad565a04f3b.png)]
14
14
 
15
-
16
-
17
- **プロジェクト「login_Struts1」のweb.xml**
15
+ ```ここに言語を入力
16
+
17
+ 4月 22, 2020 2:34:07 午後 org.apache.catalina.startup.VersionLoggerListener log
18
+
19
+ 情報: Serverのバージョン名:Apache Tomcat/9.0.34
20
+
21
+ 4月 22, 2020 2:34:07 午後 org.apache.catalina.startup.VersionLoggerListener log
22
+
23
+ 情報: Server ビルド: Apr 3 2020 12:02:52 UTC
24
+
25
+ 4月 22, 2020 2:34:07 午後 org.apache.catalina.startup.VersionLoggerListener log
26
+
27
+ 情報: サーバーのバージョン番号:9.0.34.0
28
+
29
+ 4月 22, 2020 2:34:07 午後 org.apache.catalina.startup.VersionLoggerListener log
30
+
31
+ 情報: OS 名: Windows 10
32
+
33
+ 4月 22, 2020 2:34:07 午後 org.apache.catalina.startup.VersionLoggerListener log
34
+
35
+ 情報: OS バージョン: 10.0
36
+
37
+ 4月 22, 2020 2:34:07 午後 org.apache.catalina.startup.VersionLoggerListener log
38
+
39
+ 情報: アーキテクチャ: amd64
40
+
41
+ 4月 22, 2020 2:34:07 午後 org.apache.catalina.startup.VersionLoggerListener log
42
+
43
+ 情報: Java Home: C:\Program Files\Java\jdk-14
44
+
45
+ 4月 22, 2020 2:34:07 午後 org.apache.catalina.startup.VersionLoggerListener log
46
+
47
+ 情報: JVM バージョン: 14+36-1461
48
+
49
+ 4月 22, 2020 2:34:07 午後 org.apache.catalina.startup.VersionLoggerListener log
50
+
51
+ 情報: JVM ベンダ: Oracle Corporation
52
+
53
+ 4月 22, 2020 2:34:07 午後 org.apache.catalina.startup.VersionLoggerListener log
54
+
55
+ 情報: CATALINA_BASE: C:\Users\ggg_a\eclipse-workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0
56
+
57
+ 4月 22, 2020 2:34:07 午後 org.apache.catalina.startup.VersionLoggerListener log
58
+
59
+ 情報: CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 9.0
60
+
61
+ 4月 22, 2020 2:34:07 午後 org.apache.catalina.startup.VersionLoggerListener log
62
+
63
+ 情報: コマンドライン引数:-Dcatalina.base=C:\Users\ggg_a\eclipse-workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0
64
+
65
+ 4月 22, 2020 2:34:07 午後 org.apache.catalina.startup.VersionLoggerListener log
66
+
67
+ 情報: コマンドライン引数:-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 9.0
68
+
69
+ 4月 22, 2020 2:34:07 午後 org.apache.catalina.startup.VersionLoggerListener log
70
+
71
+ 情報: コマンドライン引数:-Dwtp.deploy=C:\Users\ggg_a\eclipse-workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
72
+
73
+ 4月 22, 2020 2:34:07 午後 org.apache.catalina.startup.VersionLoggerListener log
74
+
75
+ 情報: コマンドライン引数:-Dfile.encoding=MS932
76
+
77
+ 4月 22, 2020 2:34:07 午後 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
78
+
79
+ 情報: 商用環境に最適な性能を発揮する APR ベースの Tomcat ネイティブライブラリが java.library.path [C:\Program Files\Java\jdk-14\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jdk-14/bin/server;C:/Program Files/Java/jdk-14/bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Java\jdk-14\bin;C:\Users\ggg_a\AppData\Local\Microsoft\WindowsApps;;C:\Users\ggg_a\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\ggg_a\OneDrive\デスクトップ;;.] に存在しません。
80
+
81
+ 4月 22, 2020 2:34:08 午後 org.apache.coyote.AbstractProtocol init
82
+
83
+ 情報: プロトコルハンドラ ["http-nio-8100"] を初期化します。
84
+
85
+ 4月 22, 2020 2:34:08 午後 org.apache.catalina.startup.Catalina load
86
+
87
+ 情報: サーバーの初期化 [582]ms
88
+
89
+ 4月 22, 2020 2:34:08 午後 org.apache.catalina.core.StandardService startInternal
90
+
91
+ 情報: サービス [Catalina] を起動します
92
+
93
+ 4月 22, 2020 2:34:08 午後 org.apache.catalina.core.StandardEngine startInternal
94
+
95
+ 情報: サーブレットエンジンの起動:[Apache Tomcat/9.0.34]
96
+
97
+ 4月 22, 2020 2:34:08 午後 org.apache.jasper.servlet.TldScanner scanJars
98
+
99
+ 情報: 少なくとも1つのJARが、まだTLDを含んでいないTLDについてスキャンされました。 スキャンしたが、そこにTLDが見つからなかったJARの完全なリストについては、このロガーのデバッグログを有効にしてください。 スキャン中に不要なJARをスキップすると、起動時間とJSPのコンパイル時間が改善されます。
100
+
101
+ 4月 22, 2020 2:34:09 午後 org.apache.jasper.servlet.TldScanner scanJars
102
+
103
+ 情報: 少なくとも1つのJARが、まだTLDを含んでいないTLDについてスキャンされました。 スキャンしたが、そこにTLDが見つからなかったJARの完全なリストについては、このロガーのデバッグログを有効にしてください。 スキャン中に不要なJARをスキップすると、起動時間とJSPのコンパイル時間が改善されます。
104
+
105
+ 4月 22, 2020 2:34:09 午後 org.apache.catalina.core.StandardContext filterStart
106
+
107
+ 重大: フィルタ [struts2] の起動中の例外です
108
+
109
+ java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
110
+
111
+ at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
112
+
113
+ at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
114
+
115
+ at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:540)
116
+
117
+ at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:521)
118
+
119
+ at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
120
+
121
+ at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:249)
122
+
123
+ at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:102)
124
+
125
+ at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4538)
126
+
127
+ at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5177)
128
+
129
+ at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
130
+
131
+ at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
132
+
133
+ at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
134
+
135
+ at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
136
+
137
+ at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
138
+
139
+ at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
140
+
141
+ at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
142
+
143
+ at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
144
+
145
+ at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
146
+
147
+ at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
148
+
149
+ at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
150
+
151
+ at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
152
+
153
+ at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
154
+
155
+ at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
156
+
157
+ at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
158
+
159
+ at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
160
+
161
+ at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
162
+
163
+ at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
164
+
165
+ at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
166
+
167
+ at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
168
+
169
+ at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
170
+
171
+ at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
172
+
173
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
174
+
175
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
176
+
177
+ at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
178
+
179
+ at java.base/java.lang.reflect.Method.invoke(Method.java:564)
180
+
181
+ at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)
182
+
183
+ at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
184
+
185
+
186
+
187
+ 4月 22, 2020 2:34:09 午後 org.apache.catalina.core.StandardContext startInternal
188
+
189
+ 重大: 1つまたは複数のフィルタを開始できませんでした。 完全な詳細は適切なコンテナログファイルにあります。
190
+
191
+ 4月 22, 2020 2:34:09 午後 org.apache.catalina.core.StandardContext startInternal
192
+
193
+ 重大: 以前のエラーのためにコンテキストの起動が失敗しました [/login_Struts1]
194
+
195
+ WARNING: An illegal reflective access operation has occurred
196
+
197
+ WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%209.0/lib/catalina.jar) to field java.io.ObjectStreamClass$Caches.localDescs
198
+
199
+ WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase
200
+
201
+ WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
202
+
203
+ WARNING: All illegal access operations will be denied in a future release
204
+
205
+ 4月 22, 2020 2:34:09 午後 org.apache.coyote.AbstractProtocol start
206
+
207
+ 情報: プロトコルハンドラー ["http-nio-8100"] を開始しました。
208
+
209
+ 4月 22, 2020 2:34:09 午後 org.apache.catalina.startup.Catalina start
210
+
211
+ 情報: サーバーの起動 [1,314]ms
18
212
 
19
213
  ```
20
214
 
21
- <?xml version="1.0" encoding="UTF-8"?>
22
-
23
- <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24
-
25
- xmlns="http://xmlns.jcp.org/xml/ns/javaee"
26
-
27
- xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
28
-
29
- id="WebApp_ID" version="3.1">
30
-
31
- <display-name>login_Struts1</display-name>
32
-
33
- <welcome-file-list>
34
-
35
- <welcome-file>/jsp/login.jsp</welcome-file>
36
-
37
- </welcome-file-list>
38
-
39
- <!-- struts2の設定 -->
40
-
41
- <filter>
42
-
43
- <filter-name>struts2</filter-name>
44
-
45
- <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
46
-
47
- </filter>
48
-
49
- <filter-mapping>
50
-
51
- <filter-name>struts2</filter-name>
52
-
53
- <url-pattern>/*</url-pattern>
54
-
55
- </filter-mapping>
56
-
57
- </web-app>
58
-
59
- ```
60
-
61
- **Serverフォルダ内のServer.xml**
62
-
63
- ```
64
-
65
- <?xml version="1.0" encoding="UTF-8"?>
66
-
67
- <!--
68
-
69
- Licensed to the Apache Software Foundation (ASF) under one or more
70
-
71
- contributor license agreements. See the NOTICE file distributed with
72
-
73
- this work for additional information regarding copyright ownership.
74
-
75
- The ASF licenses this file to You under the Apache License, Version 2.0
76
-
77
- (the "License"); you may not use this file except in compliance with
78
-
79
- the License. You may obtain a copy of the License at
80
-
81
-
82
-
83
- http://www.apache.org/licenses/LICENSE-2.0
84
-
85
-
86
-
87
- Unless required by applicable law or agreed to in writing, software
88
-
89
- distributed under the License is distributed on an "AS IS" BASIS,
90
-
91
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
92
-
93
- See the License for the specific language governing permissions and
94
-
95
- limitations under the License.
96
-
97
- --><!-- Note: A "Server" is not itself a "Container", so you may not
98
-
99
- define subcomponents such as "Valves" at this level.
100
-
101
- Documentation at /docs/config/server.html
102
-
103
- --><Server port="8020" shutdown="SHUTDOWN">
104
-
105
- <Listener className="org.apache.catalina.startup.VersionLoggerListener"/>
106
-
107
- <!-- Security listener. Documentation at /docs/config/listeners.html
108
-
109
- <Listener className="org.apache.catalina.security.SecurityListener" />
110
-
111
- -->
112
-
113
- <!--APR library loader. Documentation at /docs/apr.html -->
114
-
115
- <Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/>
116
-
117
- <!-- Prevent memory leaks due to use of particular java/javax APIs-->
118
-
119
- <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
120
-
121
- <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
122
-
123
- <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>
124
-
125
-
126
-
127
- <!-- Global JNDI resources
128
-
129
- Documentation at /docs/jndi-resources-howto.html
130
-
131
- -->
132
-
133
- <GlobalNamingResources>
134
-
135
- <!-- Editable user database that can also be used by
136
-
137
- UserDatabaseRealm to authenticate users
138
-
139
- -->
140
-
141
- <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
142
-
143
- </GlobalNamingResources>
144
-
145
-
146
-
147
- <!-- A "Service" is a collection of one or more "Connectors" that share
148
-
149
- a single "Container" Note: A "Service" is not itself a "Container",
150
-
151
- so you may not define subcomponents such as "Valves" at this level.
152
-
153
- Documentation at /docs/config/service.html
154
-
155
- -->
156
-
157
- <Service name="Catalina">
158
-
159
-
160
-
161
- <!--The connectors can use a shared executor, you can define one or more named thread pools-->
162
-
163
- <!--
164
-
165
- <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
166
-
167
- maxThreads="150" minSpareThreads="4"/>
168
-
169
- -->
170
-
171
-
172
-
173
-
174
-
175
- <!-- A "Connector" represents an endpoint by which requests are received
176
-
177
- and responses are returned. Documentation at :
178
-
179
- Java HTTP Connector: /docs/config/http.html
180
-
181
- Java AJP Connector: /docs/config/ajp.html
182
-
183
- APR (HTTP/AJP) Connector: /docs/apr.html
184
-
185
- Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
186
-
187
- -->
188
-
189
- <Connector connectionTimeout="20000" port="8100" protocol="HTTP/1.1" redirectPort="8443"/>
190
-
191
- <!-- A "Connector" using the shared thread pool-->
192
-
193
- <!--
194
-
195
- <Connector executor="tomcatThreadPool"
196
-
197
- port="8080" protocol="HTTP/1.1"
198
-
199
- connectionTimeout="20000"
200
-
201
- redirectPort="8443" />
202
-
203
- -->
204
-
205
- <!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443
206
-
207
- This connector uses the NIO implementation. The default
208
-
209
- SSLImplementation will depend on the presence of the APR/native
210
-
211
- library and the useOpenSSL attribute of the
212
-
213
- AprLifecycleListener.
214
-
215
- Either JSSE or OpenSSL style configuration may be used regardless of
216
-
217
- the SSLImplementation selected. JSSE style configuration is used below.
218
-
219
- -->
220
-
221
- <!--
222
-
223
- <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
224
-
225
- maxThreads="150" SSLEnabled="true">
226
-
227
- <SSLHostConfig>
228
-
229
- <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
230
-
231
- type="RSA" />
232
-
233
- </SSLHostConfig>
234
-
235
- </Connector>
236
-
237
- -->
238
-
239
- <!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
240
-
241
- This connector uses the APR/native implementation which always uses
242
-
243
- OpenSSL for TLS.
244
-
245
- Either JSSE or OpenSSL style configuration may be used. OpenSSL style
246
-
247
- configuration is used below.
248
-
249
- -->
250
-
251
- <!--
252
-
253
- <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
254
-
255
- maxThreads="150" SSLEnabled="true" >
256
-
257
- <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
258
-
259
- <SSLHostConfig>
260
-
261
- <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
262
-
263
- certificateFile="conf/localhost-rsa-cert.pem"
264
-
265
- certificateChainFile="conf/localhost-rsa-chain.pem"
266
-
267
- type="RSA" />
268
-
269
- </SSLHostConfig>
270
-
271
- </Connector>
272
-
273
- -->
274
-
275
-
276
-
277
- <!-- Define an AJP 1.3 Connector on port 8009 -->
278
-
279
- <!--
280
-
281
- <Connector protocol="AJP/1.3"
282
-
283
- address="::1"
284
-
285
- port="8009"
286
-
287
- redirectPort="8443" />
288
-
289
- -->
290
-
291
-
292
-
293
- <!-- An Engine represents the entry point (within Catalina) that processes
294
-
295
- every request. The Engine implementation for Tomcat stand alone
296
-
297
- analyzes the HTTP headers included with the request, and passes them
298
-
299
- on to the appropriate Host (virtual host).
300
-
301
- Documentation at /docs/config/engine.html -->
302
-
303
-
304
-
305
- <!-- You should set jvmRoute to support load-balancing via AJP ie :
306
-
307
- <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
308
-
309
- -->
310
-
311
- <Engine defaultHost="localhost" name="Catalina">
312
-
313
-
314
-
315
- <!--For clustering, please take a look at documentation at:
316
-
317
- /docs/cluster-howto.html (simple how to)
318
-
319
- /docs/config/cluster.html (reference documentation) -->
320
-
321
- <!--
322
-
323
- <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
324
-
325
- -->
326
-
327
-
328
-
329
- <!-- Use the LockOutRealm to prevent attempts to guess user passwords
330
-
331
- via a brute-force attack -->
332
-
333
- <Realm className="org.apache.catalina.realm.LockOutRealm">
334
-
335
- <!-- This Realm uses the UserDatabase configured in the global JNDI
336
-
337
- resources under the key "UserDatabase". Any edits
338
-
339
- that are performed against this UserDatabase are immediately
340
-
341
- available for use by the Realm. -->
342
-
343
- <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
344
-
345
- </Realm>
346
-
347
-
348
-
349
- <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
350
-
351
-
352
-
353
- <!-- SingleSignOn valve, share authentication between web applications
354
-
355
- Documentation at: /docs/config/valve.html -->
356
-
357
- <!--
358
-
359
- <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
360
-
361
- -->
362
-
363
-
364
-
365
- <!-- Access log processes all example.
366
-
367
- Documentation at: /docs/config/valve.html
368
-
369
- Note: The pattern used is equivalent to using pattern="common" -->
370
-
371
- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log" suffix=".txt"/>
372
-
373
-
374
-
375
-
376
-
377
- <Context docBase="login_Struts1" path="/login_Struts1" reloadable="true" source="org.eclipse.jst.jee.server:login_Struts1"/></Host>
378
-
379
- </Engine>
380
-
381
- </Service>
382
-
383
- </Server>
384
-
385
- ```
386
-
387
-
388
-
389
- ### 試したこと
390
-
391
-
392
-
393
- 上記の二つのweb.xmlとserver.xmlでルートを指定して、jspファイルの内容ををブラウザ表示させようと思った。しかし、ファイルの配下を変えたり、名前をチェックしても解決しなかった。
215
+
394
216
 
395
217
 
396
218