質問編集履歴
2
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
JNDIの設定法が良く分かりません。
|
4
4
|
|
5
|
+
Tomcatと繋ぎたいです。
|
6
|
+
|
5
7
|
jarはダウンロードしてきたのですが、
|
6
8
|
|
7
9
|
server.xmlとcontext.xmlに何を記入していいか
|
1
ソースの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -384,26 +384,6 @@
|
|
384
384
|
|
385
385
|
|
386
386
|
|
387
|
-
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
388
|
-
|
389
|
-
license agreements. See the NOTICE file distributed with this work for additional
|
390
|
-
|
391
|
-
information regarding copyright ownership. The ASF licenses this file to
|
392
|
-
|
393
|
-
You under the Apache License, Version 2.0 (the "License"); you may not use
|
394
|
-
|
395
|
-
this file except in compliance with the License. You may obtain a copy of
|
396
|
-
|
397
|
-
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
|
398
|
-
|
399
|
-
by applicable law or agreed to in writing, software distributed under the
|
400
|
-
|
401
|
-
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
402
|
-
|
403
|
-
OF ANY KIND, either express or implied. See the License for the specific
|
404
|
-
|
405
|
-
language governing permissions and limitations under the License. --><!-- The contents of this file will be loaded for each web application -->
|
406
|
-
|
407
387
|
<Context>
|
408
388
|
|
409
389
|
|
@@ -418,32 +398,6 @@
|
|
418
398
|
|
419
399
|
|
420
400
|
|
421
|
-
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
|
422
|
-
|
423
|
-
<!-- <Manager pathname="" /> -->
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
<!-- Uncomment this to enable Comet connection tacking (provides events
|
428
|
-
|
429
|
-
on session expiration as well as webapp lifecycle) -->
|
430
|
-
|
431
|
-
<!-- <Valve className="org.apache.catalina.valves.CometConnectionManagerValve"
|
432
|
-
|
433
|
-
/> -->
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
401
|
<Resource name="jdbc/Library" auth="Container" type="javax.sql.DataSource"
|
448
402
|
|
449
403
|
user="root" password="" driverClassName="com.mysql.jdbc.Driver"
|
@@ -466,7 +420,141 @@
|
|
466
420
|
|
467
421
|
```
|
468
422
|
|
469
|
-
###server.x
|
423
|
+
###server.xml
|
424
|
+
|
425
|
+
```
|
426
|
+
|
427
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
<Server port="8005" shutdown="SHUTDOWN">
|
432
|
+
|
433
|
+
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
|
434
|
+
|
435
|
+
<!-- Security listener. Documentation at /docs/config/listeners.html <Listener
|
436
|
+
|
437
|
+
className="org.apache.catalina.security.SecurityListener" /> -->
|
438
|
+
|
439
|
+
<!--APR library loader. Documentation at /docs/apr.html -->
|
440
|
+
|
441
|
+
<Listener SSLEngine="on"
|
442
|
+
|
443
|
+
className="org.apache.catalina.core.AprLifecycleListener" />
|
444
|
+
|
445
|
+
<!-- Prevent memory leaks due to use of particular java/javax APIs -->
|
446
|
+
|
447
|
+
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
|
448
|
+
|
449
|
+
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
|
450
|
+
|
451
|
+
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
<!-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html -->
|
456
|
+
|
457
|
+
<GlobalNamingResources>
|
458
|
+
|
459
|
+
<!-- Editable user database that can also be used by UserDatabaseRealm
|
460
|
+
|
461
|
+
to authenticate users -->
|
462
|
+
|
463
|
+
<Resource auth="Container" description="User database that can be updated and saved"
|
464
|
+
|
465
|
+
factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase"
|
466
|
+
|
467
|
+
pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase" />
|
468
|
+
|
469
|
+
</GlobalNamingResources>
|
470
|
+
|
471
|
+
<Service name="Catalina">
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1"
|
476
|
+
|
477
|
+
redirectPort="8443" />
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
<Engine defaultHost="localhost" name="Catalina">
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
<!--For clustering, please take a look at documentation at: /docs/cluster-howto.html
|
488
|
+
|
489
|
+
(simple how to) /docs/config/cluster.html (reference documentation) -->
|
490
|
+
|
491
|
+
<!-- <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> -->
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
|
496
|
+
|
497
|
+
via a brute-force attack -->
|
498
|
+
|
499
|
+
<Realm className="org.apache.catalina.realm.LockOutRealm">
|
500
|
+
|
501
|
+
<!-- This Realm uses the UserDatabase configured in the global JNDI resources
|
502
|
+
|
503
|
+
under the key "UserDatabase". Any edits that are performed against this UserDatabase
|
504
|
+
|
505
|
+
are immediately available for use by the Realm. -->
|
506
|
+
|
507
|
+
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
|
508
|
+
|
509
|
+
resourceName="UserDatabase" />
|
510
|
+
|
511
|
+
</Realm>
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
<Host appBase="webapps" autoDeploy="true" name="localhost"
|
516
|
+
|
517
|
+
unpackWARs="true">
|
518
|
+
|
519
|
+
|
520
|
+
|
521
|
+
<!-- SingleSignOn valve, share authentication between web applications
|
522
|
+
|
523
|
+
Documentation at: /docs/config/valve.html -->
|
524
|
+
|
525
|
+
<!-- <Valve className="org.apache.catalina.authenticator.SingleSignOn"
|
526
|
+
|
527
|
+
/> -->
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
<!-- Access log processes all example. Documentation at: /docs/config/valve.html
|
532
|
+
|
533
|
+
Note: The pattern used is equivalent to using pattern="common" -->
|
534
|
+
|
535
|
+
<Valve className="org.apache.catalina.valves.AccessLogValve"
|
536
|
+
|
537
|
+
directory="logs" pattern="%h %l %u %t "%r" %s %b" prefix="localhost_access_log"
|
538
|
+
|
539
|
+
suffix=".txt" />
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
<Context docBase="Library" path="/Library" reloadable="true"
|
544
|
+
|
545
|
+
source="org.eclipse.jst.jee.server:Library" />
|
546
|
+
|
547
|
+
</Host>
|
548
|
+
|
549
|
+
</Engine>
|
550
|
+
|
551
|
+
</Service>
|
552
|
+
|
553
|
+
</Server>
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
```
|
470
558
|
|
471
559
|
|
472
560
|
|