IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Tomcat et TomEE Java Discussion :

[Tomcat] Problème pour accéder à une servlet


Sujet :

Tomcat et TomEE Java

  1. #1
    Membre habitué
    Profil pro
    Inscrit en
    mars 2002
    Messages
    560
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : mars 2002
    Messages : 560
    Points : 148
    Points
    148
    Par défaut [Tomcat] Problème pour accéder à une servlet
    Salut,

    J'essaie désespérement d'accéder à une servlet avec Tomcat 4.1.18, mais je n'y arrive plus depuis peu.

    J'ai l'erreur suivante :
    "
    Etat HTTP 404 - /statcli/servlet/Login

    --------------------------------------------------------------------------------

    type Rapport d''état

    message /statcli/servlet/Login

    description La ressource demandée (/statcli/servlet/Login) n'est pas disponible.

    -----------------------------
    "
    Le problème c'est que Tomcat est combiné avec le serveur Apache et que je ne sais pas pourquoi ca ne va plus. Ca marchait à un moment.

    Si vous avez quelques pistes, ça m'arrangerait.

    Merci d'avance.

  2. #2
    Membre habitué Avatar de hedgehog
    Profil pro
    Inscrit en
    avril 2004
    Messages
    295
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : avril 2004
    Messages : 295
    Points : 133
    Points
    133
    Par défaut
    Montre nous tes fichiers "web.xml" et "server.xml"

  3. #3
    Membre habitué
    Profil pro
    Inscrit en
    mars 2002
    Messages
    560
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : mars 2002
    Messages : 560
    Points : 148
    Points
    148
    Par défaut
    OK, voilà déjà le fichier "web.xml". N'ayant pas modifié le fichier du serveur, je ne l'ai pas joint dans l'immédiat :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
     
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--
      Copyright 2004 The Apache Software Foundation
     
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
     
          http://www.apache.org/licenses/LICENSE-2.0
     
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
    -->
     
    <!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">
     
    <web-app>
     
        <display-name>Servlet 2.4 Examples</display-name>
        <description>
          Servlet 2.4 Examples.
        </description>
     
        <!-- Define servlet-mapped and path-mapped example filters -->
        <filter>
            <filter-name>Servlet Mapped Filter</filter-name>
            <filter-class>filters.ExampleFilter</filter-class>
    	<init-param>
    	    <param-name>attribute</param-name>
    	    <param-value>filters.ExampleFilter.SERVLET_MAPPED</param-value>
    	</init-param>
        </filter>
        <filter>
            <filter-name>Path Mapped Filter</filter-name>
            <filter-class>filters.ExampleFilter</filter-class>
    	<init-param>
    	    <param-name>attribute</param-name>
    	    <param-value>filters.ExampleFilter.PATH_MAPPED</param-value>
    	</init-param>
        </filter>
        <filter>
            <filter-name>Request Dumper Filter</filter-name>
            <filter-class>filters.RequestDumperFilter</filter-class>
        </filter>
     
        <!-- Example filter to set character encoding on each request -->
        <filter>
            <filter-name>Set Character Encoding</filter-name>
            <filter-class>filters.SetCharacterEncodingFilter</filter-class>
            <init-param>
                <param-name>encoding</param-name>
                <param-value>EUC_JP</param-value>
            </init-param>
        </filter>
     
        <filter>
            <filter-name>Compression Filter</filter-name>
            <filter-class>compressionFilters.CompressionFilter</filter-class>
     
            <init-param>
              <param-name>compressionThreshold</param-name>
              <param-value>10</param-value>
            </init-param>
            <init-param>
              <param-name>debug</param-name>
              <param-value>0</param-value>
            </init-param>
        </filter>
     
        <!-- Define filter mappings for the defined filters -->
        <filter-mapping>
            <filter-name>Servlet Mapped Filter</filter-name>
    	<servlet-name>invoker</servlet-name>
        </filter-mapping>
        <filter-mapping>
            <filter-name>Path Mapped Filter</filter-name>
    	<url-pattern>/servlet/*</url-pattern>
        </filter-mapping>
     
     
    <!-- Example filter mapping to apply the "Set Character Encoding" filter
         to *all* requests processed by this web application -->
    <!--
        <filter-mapping>
            <filter-name>Set Character Encoding</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>
    -->
     
    <!--
        <filter-mapping>
          <filter-name>Compression Filter</filter-name>
          <url-pattern>/CompressionTest</url-pattern>
        </filter-mapping>
    -->
     
    <!--
        <filter-mapping>
            <filter-name>Request Dumper Filter</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>
    -->
     
        <!-- Define example application events listeners -->
        <listener>
            <listener-class>listeners.ContextListener</listener-class>
        </listener>
        <listener>
            <listener-class>listeners.SessionListener</listener-class>
        </listener>
     
        <!-- Define servlets that are included in the example application -->
        
        
        <!-- Application Visu Charge Batterie -->
        <!-- ***************************************************************** -->
        
        
        <servlet>
                   		<servlet-name>BattPDAServlet</servlet-name>
                    	<servlet-class>BattPDAServlet</servlet-class>    	    
                            <init-param>
                    		<param-name>servPath</param-name>
                    		<param-value>http://mon_ip/statcli/servlet/</param-value>
                    	</init-param>                    
        </servlet>
        
        
        <servlet>
                	    <servlet-name>BattPDAServlet0</servlet-name>
                	    <servlet-class>BattPDAServlet0</servlet-class>    	    
                            <init-param>
                		<param-name>servPath</param-name>
                		<param-value>http://mon_ip/statcli/servlet/</param-value>
                	    </init-param>                    
        </servlet>
            
        <servlet>
            	    <servlet-name>BattPDAServlet01</servlet-name>
            	    <servlet-class>BattPDAServlet01</servlet-class>    	    
                        <init-param>
            		<param-name>servPath</param-name>
            		<param-value>http://mon_ip/statcli/servlet/</param-value>
            	    </init-param>
                        <init-param>
            		<param-name>jdbcUrl</param-name>
            		<param-value>jdbc:microsoft:sqlserver://192.168.7.3:1433;DatabaseName=PDA</param-value>
            	    </init-param>
            	    <init-param>
            		<param-name>db_user</param-name>
            		<param-value>sa</param-value>
            	    </init-param>
                        <init-param>
            		<param-name>db_pwd</param-name>
            		<param-value>sa</param-value>
            	    </init-param>
        </servlet>
        
        <servlet>
                	    <servlet-name>BInfosServlet</servlet-name>
                	    <servlet-class>BInfosServlet</servlet-class>    	    
                            <init-param>
                		<param-name>servPath</param-name>
                		<param-value>http://mon_ip/statcli/servlet/</param-value>
                	    </init-param>
                            <init-param>
                		<param-name>jdbcUrl</param-name>
                		<param-value>jdbc:microsoft:sqlserver://192.168.7.3:1433;DatabaseName=PDA</param-value>
                	    </init-param>
                	    <init-param>
                		<param-name>db_user</param-name>
                		<param-value>sa</param-value>
                	    </init-param>
                            <init-param>
                		<param-name>db_pwd</param-name>
                		<param-value>sa</param-value>
                	    </init-param>
        </servlet>
        
        
        <!-- Application WEB -->
        <!-- ***************************************************************** -->
        
        
        <servlet>
    	    <servlet-name>AdminData</servlet-name>
    	    <servlet-class>AdminData</servlet-class>
    	    <init-param>
    		<param-name>imgPath</param-name>
    		<param-value>http://mon_ip/statcli/images/</param-value>
    	    </init-param>
                <init-param>
    		<param-name>servPath</param-name>
    		<param-value>http://mon_ip/statcli/servlet/</param-value>
    	    </init-param>
                <init-param>
    		<param-name>jdbcUrl</param-name>
    		<param-value>jdbc:microsoft:sqlserver://192.168.7.3:1433;DatabaseName=WEB_SOLCLI</param-value>
    	    </init-param>
    	    <init-param>
    		<param-name>db_user</param-name>
    		<param-value>sa</param-value>
    	    </init-param>
                <init-param>
    		<param-name>db_pwd</param-name>
    		<param-value>sa</param-value>
    	    </init-param>
        </servlet>
        
        <servlet>
            <servlet-name>AdminData0</servlet-name>
            <servlet-class>AdminData0</servlet-class>
            <init-param>
    		<param-name>servPath</param-name>
    		<param-value>http://mon_ip/statcli/servlet/</param-value>
            </init-param>
        </servlet>
        <servlet>
            <servlet-name>AdminData1</servlet-name>
            <servlet-class>AdminData1</servlet-class>
            <init-param>
    		<param-name>servPath</param-name>
    		<param-value>http://mon_ip/statcli/servlet/</param-value>
    	</init-param>
    	<init-param>
    		<param-name>jdbcUrl</param-name>
    		<param-value>jdbc:microsoft:sqlserver://192.168.7.3:1433;DatabaseName=WEB_SOLCLI</param-value>
    	</init-param>
    	<init-param>
    		<param-name>db_user</param-name>
    		<param-value>sa</param-value>
    	</init-param>
    	<init-param>
    		<param-name>db_pwd</param-name>
    		<param-value>sa</param-value>
            </init-param>
        </servlet>
        <servlet>
        <servlet-name>AdminData2</servlet-name>
        <servlet-class>AdminData2</servlet-class>
        	<init-param>
    		<param-name>servPath</param-name>
    		<param-value>http://mon_ip/statcli/servlet/</param-value>
        	</init-param>
    	<init-param>
    		<param-name>jdbcUrl</param-name>
    		<param-value>jdbc:microsoft:sqlserver://192.168.7.3:1433;DatabaseName=WEB_SOLCLI</param-value>
    	</init-param>
    	<init-param>
    		<param-name>db_user</param-name>
    		<param-value>sa</param-value>
    	</init-param>
    	<init-param>
    		<param-name>db_pwd</param-name>
    		<param-value>sa</param-value>
            </init-param>
        </servlet>
        
        <servlet>
            <servlet-name>Login</servlet-name>
            <servlet-class>Login</servlet-class>
            <init-param>
    		<param-name>imgPath</param-name>
    		<param-value>http://mon_ip/statcli/images/</param-value>
            </init-param>
            <init-param>
    		<param-name>servPath</param-name>
    		<param-value>http://mon_ip/statcli/servlet/</param-value>
    	</init-param>
        </servlet>
        <servlet>
            <servlet-name>Authentication</servlet-name>
            <servlet-class>Authentication</servlet-class>
            <init-param>
    			<param-name>imgPath</param-name>
    			<param-value>http://mon_ip/statcli/images/</param-value>
            </init-param>
            <init-param>
    			<param-name>servPath</param-name>
    			<param-value>http://mon_ip/statcli/servlet/</param-value>
            </init-param>
            <init-param>
    			<param-name>jdbcUrl</param-name>
    			<param-value>jdbc:microsoft:sqlserver://192.168.7.3:1433;DatabaseName=WEB_SOLCLI</param-value>
    	</init-param>
    	<init-param>
    			<param-name>db_user</param-name>
    			<param-value>sa</param-value>
    	</init-param>
    	<init-param>
    			<param-name>db_pwd</param-name>
    			<param-value>sa</param-value>
            </init-param>
        </servlet>
        <servlet>
            <servlet-name>Authentication1</servlet-name>
            <servlet-class>Authentication1</servlet-class>
            <init-param>
    		<param-name>imgPath</param-name>
    		<param-value>http://mon_ip/statcli/images/</param-value>
    	</init-param>
    	<init-param>
    		<param-name>servPath</param-name>
    		<param-value>http://mon_ip/statcli/servlet/</param-value>
            </init-param>
        </servlet>
        
        <servlet>
            <servlet-name>ViewData0</servlet-name>
            <servlet-class>ViewData0</servlet-class>
            <init-param>
    		<param-name>imgPath</param-name>
    		<param-value>http://mon_ip/statcli/images/</param-value>
    	</init-param>
    	<init-param>
    		<param-name>servPath</param-name>
    		<param-value>http://mon_ip/statcli/servlet/</param-value>
    	</init-param>
    	<init-param>
    		<param-name>jdbcUrl</param-name>
    		<param-value>jdbc:microsoft:sqlserver://192.168.7.3:1433;DatabaseName=WEB_SOLCLI</param-value>
    	</init-param>
    	<init-param>
    		<param-name>db_user</param-name>
    		<param-value>sa</param-value>
    	</init-param>
    	<init-param>
    		<param-name>db_pwd</param-name>
    		<param-value>sa</param-value>
            </init-param>
        </servlet>
        <servlet>
            <servlet-name>ViewData1</servlet-name>
            <servlet-class>ViewData1</servlet-class>
            <init-param>
    		<param-name>imgPath</param-name>
    		<param-value>http://mon_ip/statcli/images/</param-value>
    	</init-param>
    	<init-param>
    		<param-name>servPath</param-name>
    		<param-value>http://mon_ip/statcli/servlet/</param-value>
    	</init-param>
    	<init-param>
    		<param-name>jdbcUrl</param-name>
    		<param-value>jdbc:microsoft:sqlserver://192.168.7.3:1433;DatabaseName=WEB_SOLCLI</param-value>
    	</init-param>
    	<init-param>
    		<param-name>db_user</param-name>
    		<param-value>sa</param-value>
    	</init-param>
    	<init-param>
    		<param-name>db_pwd</param-name>
    		<param-value>sa</param-value>
            </init-param>
        </servlet>
        
        <servlet>
            <servlet-name>AddData0</servlet-name>
            <servlet-class>AddData0</servlet-class>
            <init-param>
    		<param-name>imgPath</param-name>
    		<param-value>http://mon_ip/statcli/images/</param-value>
    	</init-param>
    	<init-param>
    		<param-name>servPath</param-name>
    		<param-value>http://mon_ip/statcli/servlet/</param-value>
    	</init-param>
    	<init-param>
    		<param-name>jdbcUrl</param-name>
    		<param-value>jdbc:microsoft:sqlserver://192.168.7.3:1433;DatabaseName=WEB_SOLCLI</param-value>
    	</init-param>
    	<init-param>
    		<param-name>db_user</param-name>
    		<param-value>sa</param-value>
    	</init-param>
    	<init-param>
    		<param-name>db_pwd</param-name>
    		<param-value>sa</param-value>
            </init-param>
        </servlet>
        <servlet>
            <servlet-name>AddData1</servlet-name>
            <servlet-class>AddData1</servlet-class>
            <init-param>
    		<param-name>servPath</param-name>
    		<param-value>http://mon_ip/statcli/servlet/</param-value>
    	</init-param>
    	<init-param>
    		<param-name>jdbcUrl</param-name>
    		<param-value>jdbc:microsoft:sqlserver://192.168.7.3:1433;DatabaseName=WEB_SOLCLI</param-value>
    	</init-param>
    	<init-param>
    		<param-name>db_user</param-name>
    		<param-value>sa</param-value>
    	</init-param>
    	<init-param>
    		<param-name>db_pwd</param-name>
    		<param-value>sa</param-value>
            </init-param>
        </servlet>
        
        <servlet>
                <servlet-name>UpdateData0</servlet-name>
                <servlet-class>UpdateData0</servlet-class>
                <init-param>
        		<param-name>imgPath</param-name>
        		<param-value>http://mon_ip/statcli/images/</param-value>
        	</init-param>
        	<init-param>
        		<param-name>servPath</param-name>
        		<param-value>http://mon_ip/statcli/servlet/</param-value>
        	</init-param>
        	<init-param>
        		<param-name>jdbcUrl</param-name>
        		<param-value>jdbc:microsoft:sqlserver://192.168.7.3:1433;DatabaseName=WEB_SOLCLI</param-value>
        	</init-param>
        	<init-param>
        		<param-name>db_user</param-name>
        		<param-value>sa</param-value>
        	</init-param>
        	<init-param>
        		<param-name>db_pwd</param-name>
        		<param-value>sa</param-value>
                </init-param>
        </servlet>
        
        <servlet>
            <servlet-name>UpdateData1</servlet-name>
            <servlet-class>UpdateData1</servlet-class>
    	<init-param>
    		<param-name>servPath</param-name>
    		<param-value>http://mon_ip/statcli/servlet/</param-value>
    	</init-param>
    	<init-param>
    		<param-name>jdbcUrl</param-name>
    		<param-value>jdbc:microsoft:sqlserver://192.168.7.3:1433;DatabaseName=WEB_SOLCLI</param-value>
    	</init-param>
    	<init-param>
    		<param-name>db_user</param-name>
    		<param-value>sa</param-value>
    	</init-param>
    	<init-param>
    		<param-name>db_pwd</param-name>
    		<param-value>sa</param-value>
    	</init-param>
        </servlet>
        
        
        
        <!-- ***************************************************************** -->
        
        
        <servlet>
            <servlet-name>Test</servlet-name>
            <servlet-class>Test</servlet-class>
        </servlet>
        
        <!-- Application Infos Batterie -->
        <!-- ************************************************************************ -->
        
        
        <servlet>
            <servlet-name>BInfosServlet</servlet-name>
            <servlet-class>BInfosServlet</servlet-class>
        </servlet>
        <servlet>
            <servlet-name>InfosPDAServlet</servlet-name>
            <servlet-class>InfosPDAServlet</servlet-class>
        </servlet>
        <servlet>
            <servlet-name>BattPDAServlet</servlet-name>
            <servlet-class>BattPDAServlet</servlet-class>
        </servlet>
        <servlet>
            <servlet-name>BattPDAServlet0</servlet-name>
            <servlet-class>BattPDAServlet0</servlet-class>
        </servlet>
        <servlet>
            <servlet-name>BattPDAServlet01</servlet-name>
            <servlet-class>BattPDAServlet01</servlet-class>
        </servlet>
        <servlet>
            <servlet-name>BattPDAServlet02</servlet-name>
            <servlet-class>BattPDAServlet02</servlet-class>
        </servlet>
        <servlet>
            <servlet-name>BattPDAServletAdd</servlet-name>
            <servlet-class>BattPDAServletAdd</servlet-class>
        </servlet>
        
        <servlet>
                <servlet-name>InfosPDAServlet0</servlet-name>
                <servlet-class>InfosPDAServlet0</servlet-class>
        </servlet>
        
            
        <!-- ************************************************************************ -->
            
        
        <servlet>
            <servlet-name>CompressionFilterTestServlet</servlet-name>
            <servlet-class>compressionFilters.CompressionFilterTestServlet</servlet-class>
        </servlet>
        <servlet>
            <servlet-name>HelloWorldExample</servlet-name>
            <servlet-class>HelloWorldExample</servlet-class>
        </servlet>
        <servlet>
            <servlet-name>RequestInfoExample</servlet-name>
            <servlet-class>RequestInfoExample</servlet-class>
        </servlet>
        <servlet>
            <servlet-name>RequestHeaderExample</servlet-name>
            <servlet-class>RequestHeaderExample</servlet-class>
        </servlet>
        <servlet>
            <servlet-name>RequestParamExample</servlet-name>
            <servlet-class>RequestParamExample</servlet-class>
        </servlet>
        <servlet>
            <servlet-name>CookieExample</servlet-name>
            <servlet-class>CookieExample</servlet-class>
        </servlet>
        <servlet>
            <servlet-name>SessionExample</servlet-name>
            <servlet-class>SessionExample</servlet-class>
        </servlet>
     
        
        <servlet-mapping>
            <servlet-name>CompressionFilterTestServlet</servlet-name>
            <url-pattern>/CompressionTest</url-pattern>
        </servlet-mapping>
        
        <!-- Application WEB -->
        <!-- ************************************************************************ -->
        
        <servlet-mapping>
            <servlet-name>Login</servlet-name>
            <url-pattern>/servlet/Login</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>Authentication</servlet-name>
            <url-pattern>/servlet/Authentication</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>Authentication1</servlet-name>
            <url-pattern>/servlet/Authentication1</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
                <servlet-name>AdminData</servlet-name>
                <url-pattern>/servlet/AdminData</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>AdminData0</servlet-name>
            <url-pattern>/servlet/AdminData0</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>AdminData1</servlet-name>
            <url-pattern>/servlet/AdminData1</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>AdminData2</servlet-name>
            <url-pattern>/servlet/AdminData2</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>ViewData0</servlet-name>
            <url-pattern>/servlet/ViewData0</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>ViewData1</servlet-name>
            <url-pattern>/servlet/ViewData1</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>AddData0</servlet-name>
            <url-pattern>/servlet/AddData0</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>AddData1</servlet-name>
            <url-pattern>/servlet/AddData1</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
                <servlet-name>UpdateData0</servlet-name>
                <url-pattern>/servlet/UpdateData0</url-pattern>
            </servlet-mapping>
            <servlet-mapping>
                <servlet-name>UpdateData1</servlet-name>
                <url-pattern>/servlet/UpdateData1</url-pattern>
        </servlet-mapping>
        
        
        <!-- ************************************************************************ -->
        <servlet-mapping>
            <servlet-name>HelloWorldExample</servlet-name>
            <url-pattern>/servlet/HelloWorldExample</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>Test</servlet-name>
            <url-pattern>/servlet/Test</url-pattern>
        </servlet-mapping>
        
        <!-- ****************************Application Infos Batterie******************************** -->
        
        
        <servlet-mapping>
            <servlet-name>BInfosServlet</servlet-name>
            <url-pattern>/servlet/BInfosServlet</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>BattPDAServlet</servlet-name>
            <url-pattern>/servlet/BattPDAServlet</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>InfosPDAServlet</servlet-name>
            <url-pattern>/servlet/InfosPDAServlet</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>InfosPDAServlet0</servlet-name>
            <url-pattern>/servlet/InfosPDAServlet0</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>/servlet/BattPDAServlet0</servlet-name>
            <url-pattern>BattPDAServlet0</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>BattPDAServlet02</servlet-name>
            <url-pattern>/servlet/BattPDAServlet02</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>BattPDAServletAdd</servlet-name>
            <url-pattern>/servlet/BattPDAServletAdd</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>BattPDAServlet01</servlet-name>
            <url-pattern>/servlet/BattPDAServlet01</url-pattern>
        </servlet-mapping>
        
        
        <!-- ************************************************************************ -->
        
        <servlet-mapping>
            <servlet-name>RequestInfoExample</servlet-name>
            <url-pattern>/servlet/RequestInfoExample/*</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>RequestHeaderExample</servlet-name>
            <url-pattern>/servlet/RequestHeaderExample</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>RequestParamExample</servlet-name>
            <url-pattern>/servlet/RequestParamExample</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>CookieExample</servlet-name>
            <url-pattern>/servlet/CookieExample</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>SessionExample</servlet-name>
            <url-pattern>/servlet/SessionExample</url-pattern>
        </servlet-mapping>
     
        <security-constraint>
          <display-name>Example Security Constraint</display-name>
          <web-resource-collection>
             <web-resource-name>Protected Area</web-resource-name>
    	 <!-- Define the context-relative URL(s) to be protected -->
             <url-pattern>/jsp/security/protected/*</url-pattern>
    	 <!-- If you list http methods, only those methods are protected -->
    	 <http-method>DELETE</http-method>
             <http-method>GET</http-method>
             <http-method>POST</http-method>
    	 <http-method>PUT</http-method>
          </web-resource-collection>
          <auth-constraint>
             <!-- Anyone with one of the listed roles may access this area -->
             <role-name>tomcat</role-name>
    	 <role-name>role1</role-name>
          </auth-constraint>
        </security-constraint>
     
        <!-- Default login configuration uses form-based authentication -->
        <login-config>
          <auth-method>FORM</auth-method>
          <realm-name>Example Form-Based Authentication Area</realm-name>
          <form-login-config>
            <form-login-page>/jsp/security/protected/login.jsp</form-login-page>
            <form-error-page>/jsp/security/protected/error.jsp</form-error-page>
          </form-login-config>
        </login-config>
     
        <!-- Security roles referenced by this web application -->
        <security-role>
          <role-name>role1</role-name>
        </security-role>
        <security-role>
          <role-name>tomcat</role-name>
        </security-role>
     
        <!-- Environment entry examples -->
        <!--env-entry>
          <env-entry-description>
             The maximum number of tax exemptions allowed to be set.
          </env-entry-description>
          <env-entry-name>maxExemptions</env-entry-name>
          <env-entry-value>15</env-entry-value>
          <env-entry-type>java.lang.Integer</env-entry-type>
        </env-entry-->
        <env-entry>
          <env-entry-name>minExemptions</env-entry-name>
          <env-entry-value>1</env-entry-value>
          <env-entry-type>java.lang.Integer</env-entry-type>
        </env-entry>
        <env-entry>
          <env-entry-name>foo/name1</env-entry-name>
          <env-entry-value>value1</env-entry-value>
          <env-entry-type>java.lang.String</env-entry-type>
        </env-entry>
        <env-entry>
          <env-entry-name>foo/bar/name2</env-entry-name>
          <env-entry-value>true</env-entry-value>
          <env-entry-type>java.lang.Boolean</env-entry-type>
        </env-entry>
        <env-entry>
          <env-entry-name>name3</env-entry-name>
          <env-entry-value>1</env-entry-value>
          <env-entry-type>java.lang.Integer</env-entry-type>
        </env-entry>
        <env-entry>
          <env-entry-name>foo/name4</env-entry-name>
          <env-entry-value>10</env-entry-value>
          <env-entry-type>java.lang.Integer</env-entry-type>
        </env-entry>
     
    </web-app>
    A+

  4. #4
    Membre habitué Avatar de hedgehog
    Profil pro
    Inscrit en
    avril 2004
    Messages
    295
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : avril 2004
    Messages : 295
    Points : 133
    Points
    133
    Par défaut
    Justement pour que ta servlet fonctionne tu dois ( normalement ) , rajouter le contexte de ton appli dans le fichier "server.xml".

    Rajoute :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    <display-name>TestLogin</display-name> 
       <servlet> 
          <servlet-name>Login</servlet-name> 
          <servlet-class>Login</servlet-class> 
       </servlet> 
     
       <servlet-mapping> 
          <servlet-name>Login</servlet-name> 
          <url-pattern>/servlet/*</url-pattern> 
       </servlet-mapping>
    Dis nous si ca marche

  5. #5
    Membre habitué
    Profil pro
    Inscrit en
    mars 2002
    Messages
    560
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : mars 2002
    Messages : 560
    Points : 148
    Points
    148
    Par défaut
    Voilà le fichier "server.xml" du serveur, donc il faut que je mette cela dedans ? C'est bizarre, car dedans il n'y a pas de référence aux autres projets qui fonctionnent...J'ai pris le fichier dans le répertoire "conf" de Tomcat.



    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
     
    <!-- Example Server Configuration File -->
    <!-- Note that component elements are nested corresponding to their
         parent-child relationships with each other -->
     
    <!-- A "Server" is a singleton element that represents the entire JVM,
         which may contain one or more "Service" instances.  The Server
         listens for a shutdown command on the indicated port.
     
         Note:  A "Server" is not itself a "Container", so you may not
         define subcomponents such as "Valves" or "Loggers" at this level.
     -->
     
    <Server port="8005" shutdown="SHUTDOWN" debug="0">
     
     
      <!-- Uncomment these entries to enable JMX MBeans support -->
      <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
                debug="0"/>
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
                debug="0"/>
     
      <!-- Global JNDI resources -->
      <GlobalNamingResources>
     
        <!-- Test entry for demonstration purposes -->
        <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
     
        <!-- Editable user database that can also be used by
             UserDatabaseRealm to authenticate users -->
        <Resource name="UserDatabase" auth="Container"
                  type="org.apache.catalina.UserDatabase"
           description="User database that can be updated and saved">
        </Resource>
        <ResourceParams name="UserDatabase">
          <parameter>
            <name>factory</name>
            <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
          </parameter>
          <parameter>
            <name>pathname</name>
            <value>conf/tomcat-users.xml</value>
          </parameter>
        </ResourceParams>
     
      </GlobalNamingResources>
     
      <!-- A "Service" is a collection of one or more "Connectors" that share
           a single "Container" (and therefore the web applications visible
           within that Container).  Normally, that Container is an "Engine",
           but this is not required.
     
           Note:  A "Service" is not itself a "Container", so you may not
           define subcomponents such as "Valves" or "Loggers" at this level.
       -->
     
      <!-- Define the Tomcat Stand-Alone Service -->
      <Service name="Tomcat-Standalone">
     
        <!-- A "Connector" represents an endpoint by which requests are received
             and responses are returned.  Each Connector passes requests on to the
             associated "Container" (normally an Engine) for processing.
     
             By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
             You can also enable an SSL HTTP/1.1 Connector on port 8443 by
             following the instructions below and uncommenting the second Connector
             entry.  SSL support requires the following steps (see the SSL Config
             HOWTO in the Tomcat 4.0 documentation bundle for more detailed
             instructions):
             * Download and install JSSE 1.0.2 or later, and put the JAR files
               into "$JAVA_HOME/jre/lib/ext".
             * Execute:
                 %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
                 $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA  (Unix)
               with a password value of "changeit" for both the certificate and
               the keystore itself.
     
             By default, DNS lookups are enabled when a web application calls
             request.getRemoteHost().  This can have an adverse impact on
             performance, so you can disable it by setting the
             "enableLookups" attribute to "false".  When DNS lookups are disabled,
             request.getRemoteHost() will return the String version of the
             IP address of the remote client.
        -->
     
        <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 -->
        <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
    	  port="8080" minProcessors="5" maxProcessors="250"
                   enableLookups="true" redirectPort="8443"
                   acceptCount="100" debug="0" connectionTimeout="10000000"
                   useURIValidationHack="false" disableUploadTimeout="true" />
        <!-- Note : To disable connection timeouts, set connectionTimeout value 
         to -1 -->
     
        <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
        <!--
        <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
                   port="8443" minProcessors="5" maxProcessors="75"
                   enableLookups="true"
    	       acceptCount="100" debug="0" scheme="https" secure="true"
                   useURIValidationHack="false" disableUploadTimeout="true">
          <Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
                   clientAuth="false" protocol="TLS" />
        </Connector>
        -->
     
        <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
        <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
                   port="8009" minProcessors="5" maxProcessors="250"
                   enableLookups="true" redirectPort="8443"
                   acceptCount="100" debug="0" connectionTimeout="10000000"
                   useURIValidationHack="false"
                   protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
     
        <!-- Define an AJP 1.3 Connector on port 8009 -->
        <!--
        <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
                   port="8009" minProcessors="5" maxProcessors="75"
                   acceptCount="10" debug="0"/>
        -->
     
        <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
        <!-- See proxy documentation for more information about using this. -->
        <!--
        <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
                   port="8082" minProcessors="5" maxProcessors="75"
                   enableLookups="true" disableUploadTimeout="true"
                   acceptCount="100" debug="0" connectionTimeout="20000"
                   proxyPort="80" useURIValidationHack="false" />
        -->
     
        <!-- Define a non-SSL legacy HTTP/1.1 Test Connector on port 8083 -->
        <!--
        <Connector className="org.apache.catalina.connector.http.HttpConnector"
                   port="8083" minProcessors="5" maxProcessors="75"
                   enableLookups="true" redirectPort="8443"
                   acceptCount="10" debug="0" />
        -->
     
        <!-- Define a non-SSL HTTP/1.0 Test Connector on port 8084 -->
        <!--
        <Connector className="org.apache.catalina.connector.http10.HttpConnector"
                   port="8084" minProcessors="5" maxProcessors="75"
                   enableLookups="true" redirectPort="8443"
                   acceptCount="10" debug="0" />
        -->
     
        <!-- An Engine represents the entry point (within Catalina) that processes
             every request.  The Engine implementation for Tomcat stand alone
             analyzes the HTTP headers included with the request, and passes them
             on to the appropriate Host (virtual host). -->
     
        <!-- Define the top level container in our container hierarchy -->
        <Engine name="Standalone" defaultHost="localhost" debug="0">
     
          <!-- The request dumper valve dumps useful debugging information about
               the request headers and cookies that were received, and the response
               headers and cookies that were sent, for all requests received by
               this instance of Tomcat.  If you care only about requests to a
               particular virtual host, or a particular application, nest this
               element inside the corresponding <Host> or <Context> entry instead.
     
               For a similar mechanism that is portable to all Servlet 2.3
               containers, check out the "RequestDumperFilter" Filter in the
               example application (the source for this filter may be found in
               "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
     
               Request dumping is disabled by default.  Uncomment the following
               element to enable it. -->
          <!--
          <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
          -->
     
          <!-- Global logger unless overridden at lower levels -->
          <Logger className="org.apache.catalina.logger.FileLogger"
                  prefix="catalina_log." suffix=".txt"
                  timestamp="true"/>
     
          <!-- Because this Realm is here, an instance will be shared globally -->
     
          <!-- This Realm uses the UserDatabase configured in the global JNDI
               resources under the key "UserDatabase".  Any edits
               that are performed against this UserDatabase are immediately
               available for use by the Realm.  -->
          <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                     debug="0" resourceName="UserDatabase"/>
     
          <!-- Comment out the old realm but leave here for now in case we
               need to go back quickly -->
          <!--
          <Realm className="org.apache.catalina.realm.MemoryRealm" />
          -->
     
          <!-- Replace the above Realm with one of the following to get a Realm
               stored in a database and accessed via JDBC -->
     
          <!--
          <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
                 driverName="org.gjt.mm.mysql.Driver"
              connectionURL="jdbc:mysql://localhost/authority"
             connectionName="test" connectionPassword="test"
                  userTable="users" userNameCol="user_name" userCredCol="user_pass"
              userRoleTable="user_roles" roleNameCol="role_name" />
          -->
     
          <!--
          <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
                 driverName="oracle.jdbc.driver.OracleDriver"
              connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
             connectionName="scott" connectionPassword="tiger"
                  userTable="users" userNameCol="user_name" userCredCol="user_pass"
              userRoleTable="user_roles" roleNameCol="role_name" />
          -->
     
          <!--
          <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
                 driverName="sun.jdbc.odbc.JdbcOdbcDriver"
              connectionURL="jdbc:odbc:CATALINA"
                  userTable="users" userNameCol="user_name" userCredCol="user_pass"
              userRoleTable="user_roles" roleNameCol="role_name" />
          -->
     
          <!-- Define the default virtual host -->
          <Host name="localhost" debug="0" appBase="webapps" 
           unpackWARs="true" autoDeploy="true">
     
            <!-- Normally, users must authenticate themselves to each web app
                 individually.  Uncomment the following entry if you would like
                 a user to be authenticated the first time they encounter a
                 resource protected by a security constraint, and then have that
                 user identity maintained across *all* web applications contained
                 in this virtual host. -->
            <!--
            <Valve className="org.apache.catalina.authenticator.SingleSignOn"
                       debug="0"/>
            -->
     
            <!-- Access log processes all requests for this virtual host.  By
                 default, log files are created in the "logs" directory relative to
                 $CATALINA_HOME.  If you wish, you can specify a different
                 directory with the "directory" attribute.  Specify either a relative
                 (to $CATALINA_HOME) or absolute path to the desired directory.
            -->
            <!--
            <Valve className="org.apache.catalina.valves.AccessLogValve"
                     directory="logs"  prefix="localhost_access_log." suffix=".txt"
                     pattern="common" resolveHosts="false"/>
            -->
     
            <!-- Logger shared by all Contexts related to this virtual host.  By
                 default (when using FileLogger), log files are created in the "logs"
                 directory relative to $CATALINA_HOME.  If you wish, you can specify
                 a different directory with the "directory" attribute.  Specify either a
                 relative (to $CATALINA_HOME) or absolute path to the desired
                 directory.-->
            <Logger className="org.apache.catalina.logger.FileLogger"
                     directory="logs"  prefix="localhost_log." suffix=".txt"
    	        timestamp="true"/>
     
            <!-- Define properties for each web application.  This is only needed
                 if you want to set non-default properties, or have web application
                 document roots in places other than the virtual host's appBase
                 directory.  -->
     
            <!-- Tomcat Root Context -->
            <!--
              <Context path="" docBase="ROOT" debug="0"/>
            -->
     
            <!-- Tomcat Examples Context -->
            <Context path="/examples" docBase="examples" debug="0"
                     reloadable="true" crossContext="true">
              <Logger className="org.apache.catalina.logger.FileLogger"
                         prefix="localhost_examples_log." suffix=".txt"
            	  timestamp="true"/>
              <Ejb   name="ejb/EmplRecord" type="Entity"
                     home="com.wombat.empl.EmployeeRecordHome"
                   remote="com.wombat.empl.EmployeeRecord"/>
     
              <!-- If you wanted the examples app to be able to edit the
                   user database, you would uncomment the following entry.
                   Of course, you would want to enable security on the
                   application as well, so this is not done by default!
                   The database object could be accessed like this:
     
                   Context initCtx = new InitialContext();
                   Context envCtx = (Context) initCtx.lookup("java:comp/env");
                   UserDatabase database =
                        (UserDatabase) envCtx.lookup("userDatabase");
              -->
    <!--
              <ResourceLink name="userDatabase" global="UserDatabase"
                            type="org.apache.catalina.UserDatabase"/>
    -->
     
     
              <!-- PersistentManager: Uncomment the section below to test Persistent 
    		       Sessions.
     
                   saveOnRestart: If true, all active sessions will be saved
                     to the Store when Catalina is shutdown, regardless of
                     other settings. All Sessions found in the Store will be 
                     loaded on startup. Sessions past their expiration are
                     ignored in both cases.
                   maxActiveSessions: If 0 or greater, having too many active 
                     sessions will result in some being swapped out. minIdleSwap
                     limits this. -1 means unlimited sessions are allowed.
                     0 means sessions will almost always be swapped out after
                     use - this will be noticeably slow for your users.
                   minIdleSwap: Sessions must be idle for at least this long
                     (in seconds) before they will be swapped out due to 
                   maxActiveSessions. This avoids thrashing when the site is 
                     highly active. -1 or 0 means there is no minimum - sessions
                     can be swapped out at any time.
                   maxIdleSwap: Sessions will be swapped out if idle for this
                     long (in seconds). If minIdleSwap is higher, then it will
                     override this. This isn't exact: it is checked periodically.
                     -1 means sessions won't be swapped out for this reason,
                     although they may be swapped out for maxActiveSessions.
                     If set to >= 0, guarantees that all sessions found in the
                     Store will be loaded on startup.
                   maxIdleBackup: Sessions will be backed up (saved to the Store,
                     but left in active memory) if idle for this long (in seconds), 
                     and all sessions found in the Store will be loaded on startup.
                     If set to -1 sessions will not be backed up, 0 means they
                     should be backed up shortly after being used.
     
                   To clear sessions from the Store, set maxActiveSessions, maxIdleSwap,
                   and minIdleBackup all to -1, saveOnRestart to false, then restart 
                   Catalina.
              -->
    		  <!--
              <Manager className="org.apache.catalina.session.PersistentManager"
                  debug="0"
                  saveOnRestart="true"
                  maxActiveSessions="-1"
                  minIdleSwap="-1"
                  maxIdleSwap="-1"
                  maxIdleBackup="-1">
                    <Store className="org.apache.catalina.session.FileStore"/>
              </Manager>
    		  -->
              <Environment name="maxExemptions" type="java.lang.Integer"
                          value="15"/>
              <Parameter name="context.param.name" value="context.param.value"
                         override="false"/>
              <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
                        type="javax.sql.DataSource"/>
              <ResourceParams name="jdbc/EmployeeAppDb">
                <parameter><name>user</name><value>sa</value></parameter>
                <parameter><name>password</name><value></value></parameter>
                <parameter><name>driverClassName</name>
                  <value>org.hsql.jdbcDriver</value></parameter>
                <parameter><name>driverName</name>
                  <value>jdbc:HypersonicSQL:database</value></parameter>
              </ResourceParams>
              <Resource name="mail/Session" auth="Container"
                        type="javax.mail.Session"/>
              <ResourceParams name="mail/Session">
                <parameter>
                  <name>mail.smtp.host</name>
                  <value>localhost</value>
                </parameter>
              </ResourceParams>
              <ResourceLink name="linkToGlobalResource" 
                        global="simpleValue"
                        type="java.lang.Integer"/>
            </Context>
     
          </Host>
     
        </Engine>
     
      </Service>
     
      <!-- The MOD_WEBAPP connector is used to connect Apache 1.3 with Tomcat 4.0
           as its servlet container. Please read the README.txt file coming with
           the WebApp Module distribution on how to build it.
           (Or check out the "jakarta-tomcat-connectors/webapp" CVS repository)
     
           To configure the Apache side, you must ensure that you have the
           "ServerName" and "Port" directives defined in "httpd.conf".  Then,
           lines like these to the bottom of your "httpd.conf" file:
     
             LoadModule webapp_module libexec/mod_webapp.so
             WebAppConnection warpConnection warp localhost:8008
             WebAppDeploy examples warpConnection /examples/
     
           The next time you restart Apache (after restarting Tomcat, if needed)
           the connection will be established, and all applications you make
           visible via "WebAppDeploy" directives can be accessed through Apache.
      -->
     
      <!-- Define an Apache-Connector Service -->
    <!--
      <Service name="Tomcat-Apache">
     
        <Connector className="org.apache.catalina.connector.warp.WarpConnector"
         port="8008" minProcessors="5" maxProcessors="75"
         enableLookups="true" appBase="webapps"
         acceptCount="10" debug="0"/>
     
        <Engine className="org.apache.catalina.connector.warp.WarpEngine"
         name="Apache" debug="0">
     
          <Logger className="org.apache.catalina.logger.FileLogger"
                  prefix="apache_log." suffix=".txt"
                  timestamp="true"/>
     
          <Realm className="org.apache.catalina.realm.MemoryRealm" />
     
        </Engine>
     
      </Service>
    -->
     
    </Server>
    A+

  6. #6
    Membre habitué Avatar de hedgehog
    Profil pro
    Inscrit en
    avril 2004
    Messages
    295
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : avril 2004
    Messages : 295
    Points : 133
    Points
    133
    Par défaut
    Moi sans le mettre mon projet ne s'execute pas ...
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    <!-- Define properties for each web application.  This is only needed 
                 if you want to set non-default properties, or have web application 
                 document roots in places other than the virtual host's appBase 
                 directory.  --> 
     
            <!-- Tomcat Root Context --> 
            <!-- 
              <Context path="" docBase="ROOT" debug="0"/> 
            --> 
     
            <!-- ICI -->
            <Context path="/statcli" docBase="statcli" />
            <!-- ICI -->
     
            <!-- Tomcat Examples Context --> 
            <Context path="/examples" docBase="examples" debug="0" 
                     reloadable="true" crossContext="true"> 
              <Logger className="org.apache.catalina.logger.FileLogger" 
                         prefix="localhost_examples_log." suffix=".txt" 
                 timestamp="true"/> 
              <Ejb   name="ejb/EmplRecord" type="Entity" 
                     home="com.wombat.empl.EmployeeRecordHome" 
                   remote="com.wombat.empl.EmployeeRecord"/>

  7. #7
    Membre habitué
    Profil pro
    Inscrit en
    mars 2002
    Messages
    560
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : mars 2002
    Messages : 560
    Points : 148
    Points
    148
    Par défaut
    J'ai rajouté ces lignes dans le fichier "server.xml", mais ça ne donne rien, en tapant l'url dans un browser, j'ai toujours la même erreur :

    http//ipmonserveur/statcli/servlet/Login

  8. #8
    Membre habitué
    Profil pro
    Inscrit en
    mars 2002
    Messages
    560
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : mars 2002
    Messages : 560
    Points : 148
    Points
    148
    Par défaut
    J'ai rajouté ces lignes dans le fichier "server.xml", mais ça ne donne rien, en tapant l'url dans un browser, j'ai toujours la même erreur :

    http//ipmonserveur/statcli/servlet/Login

  9. #9
    Membre habitué Avatar de hedgehog
    Profil pro
    Inscrit en
    avril 2004
    Messages
    295
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : avril 2004
    Messages : 295
    Points : 133
    Points
    133
    Par défaut
    Desole je ne vois pas trop d'ou vient ton erreur

  10. #10
    Membre habitué
    Profil pro
    Inscrit en
    mars 2002
    Messages
    560
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : mars 2002
    Messages : 560
    Points : 148
    Points
    148
    Par défaut
    Bon, en fait c'était le fichier "web.xml" qui était incorrect.
    J'ai réglé le problème, il y avait des fichiers servlets qui n'étaient pas référencés.

    A+

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [2.x] [Symfony2] Problème pour accéder à une valeur
    Par cbtraize42 dans le forum Symfony
    Réponses: 7
    Dernier message: 09/03/2012, 18h27
  2. Problème pour accéder à une ressource ASP.NET
    Par Johann7751 dans le forum ASP.NET
    Réponses: 2
    Dernier message: 01/09/2010, 09h25
  3. Problème pour déployer une application au sein de Tomcat.
    Par mhamdi200 dans le forum Tomcat et TomEE
    Réponses: 2
    Dernier message: 07/04/2008, 13h17
  4. EJB Vs Servlet pour accéder à une BD
    Par nomadsoul dans le forum Servlets/JSP
    Réponses: 2
    Dernier message: 27/09/2006, 17h48
  5. [JSP] Problème pour accéder à un bean venant d'une servlet
    Par GLDavid dans le forum Servlets/JSP
    Réponses: 6
    Dernier message: 07/06/2006, 09h43

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo