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

Servlets/JSP Java Discussion :

[Débutant][JSP] Lien jsp dans une page jsp


Sujet :

Servlets/JSP Java

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    53
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 53
    Points : 24
    Points
    24
    Par défaut [Débutant][JSP] Lien jsp dans une page jsp
    Voila, ma question est sans doute naive, mais j'ai beau éplucher pas mal de doc, je trouve pas la réponse a ma question, tout se que je veux savoir, c'est comment faire pour mettre un lien pointant vers une page jsp dans une page jsp en l'occurence celle la:

    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
    <HTML>
        <HEAD>
            <TITLE> Essai </TITLE>
        </HEAD>
        <BODY>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
        <p><font color="#6633FF" face="Verdana, Arial, Helvetica, sans-serif"><em><strong><img src="fanion.gif" width="300" height="200"></strong></em></font></p>
        <p><font color="#6633FF" face="Verdana, Arial, Helvetica, sans-serif"><em><strong>CLIQUER 
        SUR LE LIEN CORRESPONDANT A VOTRE REQUETE</strong></em></font></p>
        <p>&nbsp;</p>
        <p> <a href="LIEN JSP">Demande d'assistance technique</a> </p>    
        <p> <a href="/retest/ServletAffichage">Maintenance technique en cours</a> </p>
        <p> <a href="/retest/ServletAdministrateur">Accès réservé aux techniciens</a> </p>
        <p>&nbsp;</p>
        </BODY>
    </HTML>
    je voudrais que le lien pointe vers mon autre page jsp qui est dans le dossier :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    C:\Documents and Settings\Nissarte\Bureau\retest\web\formulaire.jsp
    tout simplement en faite, si c'est possible bien sur. J'ai d'autre questions, mais pour l'instant, j'ai vraiment besoin d'avoir une réponse pour celle la!

    Merci d'avance pour votre réponse

  2. #2
    Membre habitué Avatar de XristofGreek
    Inscrit en
    Août 2004
    Messages
    164
    Détails du profil
    Informations forums :
    Inscription : Août 2004
    Messages : 164
    Points : 174
    Points
    174
    Par défaut
    c'est comment faire pour mettre dans une page jsp ?
    euh... c'est çà ta question ? moi pas comprendre.

    ou c'est ecrit en rouge, je voudrais que le lien pointe vers mon autre page jsp qui est dans le dossier
    le verre de rouge , ou le vert en rouge ?
    les gens qui s'ennuient sont des gens sans imagination.

  3. #3
    Expert éminent

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Points : 7 778
    Points
    7 778
    Par défaut
    Essaie ceci :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <a href="<%=request.getContextPath()+response.encodeURL("/web/formulaire.jsp")%>">
    Modératrice Java - Struts, Servlets/JSP, ...

  4. #4
    Membre à l'essai
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    53
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 53
    Points : 24
    Points
    24
    Par défaut
    j'ai essayé ton code, cela me renvoi

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    type Rapport d'état
     
    message /web/formulaire.jsp
     
    description La ressource demandée (/web/formulaire.jsp) n'est pas disponible.
    voila pourtant, le formulaire est bien dans se dossier, j'imagine qu'il y a quelque chose a configuer dans le web.xml? mais quoi?

  5. #5
    Expert éminent

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Points : 7 778
    Points
    7 778
    Par défaut
    Peux-tu faire Affichage->Source sur la page jsp et montrer la ligne dans laquelle est codée le <a href> sur web/formulaire.jsp ?

    Peux-tu aussi montrer la ligne qui définit ton contexte retest (Context path="/retest"...) dans le fichier server.xml, dans le répertoire conf de Tomcat ?
    Modératrice Java - Struts, Servlets/JSP, ...

  6. #6
    Membre à l'essai
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    53
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 53
    Points : 24
    Points
    24
    Par défaut
    contexte retest context.xml ?)

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/retest"/>
    source du jsp :

    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
    <%--
    The taglib directive below imports the JSTL library. If you uncomment it,
    you must also add the JSTL library to the project. The Add Library... action
    on Libraries node in Projects view can be used to add the JSTL 1.1 library.
    --%>
    <%--
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
    --%>
     
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
     
    <HTML>
        <HEAD>
            <TITLE> Essai </TITLE>
        </HEAD>
        <BODY>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
        <p><font color="#6633FF" face="Verdana, Arial, Helvetica, sans-serif"><em><strong><img src="fanion.gif" width="100" height="60"></strong></em></font></p>
        <p><font color="#6633FF" face="Verdana, Arial, Helvetica, sans-serif"><em><strong>CLIQUER 
        SUR LE LIEN CORRESPONDANT A VOTRE REQUETE</strong></em></font></p>
        <p>&nbsp;</p>
     
    ************<p> <a href="<%=request.getContextPath()+response.encodeURL("/web/formulaire.jsp")%>">Demande d'assistance technique</a> </p>    *************
     
     
     
     <p> <a href="/retest/ServletAffichage">Maintenance technique en cours</a> </p>
        <p> <a href="/retest/exempl">Accès réservé aux techniciens</a> </p>
        <p>&nbsp;</p>
        </BODY>
    </HTML>
    le source si j'ai bien compris ta demandes, les etoiles pour montrer la ligne

  7. #7
    Membre à l'essai
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    53
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 53
    Points : 24
    Points
    24
    Par défaut
    j'utilise netbeans au passage, si jamais cette info est utile

  8. #8
    Expert éminent

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Points : 7 778
    Points
    7 778
    Par défaut
    Manifestement, on ne s'est pas bien compris.

    Dans le répertoire conf de Tomcat, il y a un fichier server.xml dans lequel ton contexte retest doit être défini.
    J'aimerais voir le contenu de cette ligne qui doit commencer par Context path="/retest".

    Sinon, quand tu es sur ta page jsp sur Internet Explorer, clic sur Affichage puis Source, j'aimerais voir le html généré pour la ligne suivante
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <a href="<%=request.getContextPath()+response.encodeURL("/web/formulaire.jsp")%>">
    Modératrice Java - Struts, Servlets/JSP, ...

  9. #9
    Membre à l'essai
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    53
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 53
    Points : 24
    Points
    24
    Par défaut
    voila le code generer sur internet explorer :

    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
     
     
     
     
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
     
    <HTML>
        <HEAD>
            <TITLE> Essai </TITLE>
        </HEAD>
        <BODY>
     
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
        <p><font color="#6633FF" face="Verdana, Arial, Helvetica, sans-serif"><em><strong><img src="fanion.gif" width="100" height="60"></strong></em></font></p>
        <p><font color="#6633FF" face="Verdana, Arial, Helvetica, sans-serif"><em><strong>CLIQUER 
        SUR LE LIEN CORRESPONDANT A VOTRE REQUETE</strong></em></font></p>
        <p>&nbsp;</p>
        <p> <a href="/retest/web/formulaire.jsp">Demande d'assistance technique</a> </p>    
        <p> <a href="/retest/ServletAffichage">Maintenance technique en cours</a> </p>
     
        <p> <a href="/retest/exempl">Accès réservé aux techniciens</a> </p>
        <p>&nbsp;</p>
        </BODY>
    </HTML>
    voila et pour le fichier server.xml qui est situé sur mon ordi a l'adresse suivante : C:\Documents and Settings\Nissarte\.netbeans\5.0\jakarta-tomcat-5.5.9_base\conf\server.xml
    j'en ai pas d'autre,j'ai effecuté une recheche sur mon ordi, je n'ai pas trouvé votre ligne, je vous affiche le contenu totale de se fichier :

    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
    <?xml version="1.0" encoding="UTF-8" ?> 
    - <!--  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="8025" shutdown="SHUTDOWN">
    - <!-- 
     Comment these entries out to disable JMX MBeans support used for the 
           administration web application 
     
      --> 
      <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" /> 
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> 
      <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener" /> 
    - <!--  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 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" /> 
      </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="Catalina">
    - <!-- 
     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 5 documentation bundle for more detailed
             instructions):
             * If your JDK version 1.3 or prior, 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 HTTP/1.1 Connector on port 8080 
      --> 
      <Connector URIEncoding="utf-8" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="8084" redirectPort="8443" /> 
    - <!-- 
     Note : To disable connection timeouts, set connectionTimeout value
         to 0 
     
      --> 
    - <!-- 
     Note : To use gzip compression you could set the following properties :
     
    			   compression="on" 
    			   compressionMinSize="2048" 
    			   noCompressionUserAgents="gozilla, traviata" 
    			   compressableMimeType="text/html,text/xml"
     
     
      --> 
    - <!--  Define a SSL HTTP/1.1 Connector on port 8443 
      --> 
    - <!-- 
        <Connector port="8443" maxHttpHeaderSize="8192"
                   maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                   enableLookups="false" disableUploadTimeout="true"
                   acceptCount="100" scheme="https" secure="true"
                   clientAuth="false" sslProtocol="TLS" />
     
     
      --> 
    - <!--  Define an AJP 1.3 Connector on port 8009 
      --> 
      <Connector enableLookups="false" port="8009" protocol="AJP/1.3" redirectPort="8443" /> 
    - <!--  Define a Proxied HTTP/1.1 Connector on port 8082 
      --> 
    - <!--  See proxy documentation for more information about using this. 
      --> 
    - <!-- 
        <Connector port="8082" 
                   maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                   enableLookups="false" acceptCount="100" connectionTimeout="20000"
                   proxyPort="80" disableUploadTimeout="true" />
     
     
      --> 
    - <!-- 
     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). 
     
      --> 
    - <!-- 
     You should set jvmRoute to support load-balancing via AJP ie :
        <Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">         
     
     
      --> 
    - <!--  Define the top level container in our container hierarchy 
      --> 
    - <Engine defaultHost="localhost" name="Catalina">
    - <!-- 
     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.4
               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"/>
     
     
      --> 
    - <!--  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" 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"
                 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"
                 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"
                 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
               Note: XML Schema validation will not work with Xerces 2.2.
     
     
      --> 
    - <Host appBase="webapps" autoDeploy="false" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
    - <!-- 
     Defines a cluster for this node,
                 By defining this element, means that every manager will be changed.
                 So when running a cluster, only make sure that you have webapps in there
                 that need to be clustered and remove the other ones.
                 A cluster has the following parameters:
     
                 className = the fully qualified name of the cluster class
     
                 name = a descriptive name for your cluster, can be anything
     
                 mcastAddr = the multicast address, has to be the same for all the nodes
     
                 mcastPort = the multicast port, has to be the same for all the nodes
     
                 mcastBindAddr = bind the multicast socket to a specific address
     
                 mcastTTL = the multicast TTL if you want to limit your broadcast
     
                 mcastSoTimeout = the multicast readtimeout 
     
                 mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat
     
                 mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received
     
                 tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes 
     
                 tcpListenAddress = the listen address (bind address) for TCP cluster request on this host, 
                                    in case of multiple ethernet cards.
                                    auto means that address becomes
                                    InetAddress.getLocalHost().getHostAddress()
     
                 tcpListenPort = the tcp listen port
     
                 tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
                                      has a wakup bug in java.nio. Set to 0 for no timeout
     
                 printToScreen = true means that managers will also print to std.out
     
                 expireSessionsOnShutdown = true means that 
     
                 useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called.
                                false means to replicate the session after each request.
                                false means that replication would work for the following piece of code: (only for SimpleTcpReplicationManager)
                                <%
                                HashMap map = (HashMap)session.getAttribute("map");
                                map.put("key","value");
                                %>
                 replicationMode = can be either 'pooled', 'synchronous' or 'asynchronous'.
                                   * Pooled means that the replication happens using several sockets in a synchronous way. Ie, the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tcp threads that you have dealing with replication.
                                   * Synchronous means that the thread that executes the request, is also the
                                   thread the replicates the data to the other nodes, and will not return until all
                                   nodes have received the information.
                                   * Asynchronous means that there is a specific 'sender' thread for each cluster node,
                                   so the request thread will queue the replication request into a "smart" queue,
                                   and then return to the client.
                                   The "smart" queue is a queue where when a session is added to the queue, and the same session
                                   already exists in the queue from a previous request, that session will be replaced
                                   in the queue instead of replicating two requests. This almost never happens, unless there is a 
                                   large network delay.
     
     
      --> 
    - <!-- 
                When configuring for clustering, you also add in a valve to catch all the requests
                coming in, at the end of the request, the session may or may not be replicated.
                A session is replicated if and only if all the conditions are met:
                1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
                2. a session exists (has been created)
                3. the request is not trapped by the "filter" attribute
     
                The filter attribute is to filter out requests that could not modify the session,
                hence we don't replicate the session after the end of this request.
                The filter is negative, ie, anything you put in the filter, you mean to filter out,
                ie, no replication will be done on requests that match one of the filters.
                The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
     
                filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
                ending with .gif and .js are intercepted.
     
                The deployer element can be used to deploy apps cluster wide.
                Currently the deployment only deploys/undeploys to working members in the cluster
                so no WARs are copied upons startup of a broken node.
                The deployer watches a directory (watchDir) for WAR files when watchEnabled="true"
                When a new war file is added the war gets deployed to the local instance,
                and then deployed to the other instances in the cluster.
                When a war file is deleted from the watchDir the war is undeployed locally 
                and cluster wide
     
     
      --> 
    - <!-- 
            <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
                     managerClassName="org.apache.catalina.cluster.session.DeltaManager"
                     expireSessionsOnShutdown="false"
                     useDirtyFlag="true"
                     notifyListenersOnReplication="true">
     
                <Membership 
                    className="org.apache.catalina.cluster.mcast.McastService"
                    mcastAddr="228.0.0.4"
                    mcastPort="45564"
                    mcastFrequency="500"
                    mcastDropTime="3000"/>
     
                <Receiver 
                    className="org.apache.catalina.cluster.tcp.ReplicationListener"
                    tcpListenAddress="auto"
                    tcpListenPort="4001"
                    tcpSelectorTimeout="100"
                    tcpThreadCount="6"/>
     
                <Sender
                    className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
                    replicationMode="pooled"
                    ackTimeout="15000"/>
     
                <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
                       filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
     
                <Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
                          tempDir="/tmp/war-temp/"
                          deployDir="/tmp/war-deploy/"
                          watchDir="/tmp/war-listen/"
                          watchEnabled="false"/>
            </Cluster>
     
     
      --> 
    - <!-- 
     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" />
     
     
      --> 
    - <!-- 
     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"/>
     
     
      --> 
    - <!-- 
     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.
                 This access log implementation is optimized for maximum performance,
                 but is hardcoded to support only the "common" and "combined" patterns.
     
     
      --> 
    - <!-- 
            <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
                     directory="logs"  prefix="localhost_access_log." suffix=".txt"
                     pattern="common" resolveHosts="false"/>
     
     
      --> 
    - <!-- 
     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.
                 This access log implementation is optimized for maximum performance,
                 but is hardcoded to support only the "common" and "combined" patterns.
     
                 This valve use NIO direct Byte Buffer to asynchornously store the
                 log.
     
     
      --> 
    - <!-- 
            <Valve className="org.apache.catalina.valves.ByteBufferAccessLogValve"
                     directory="logs"  prefix="localhost_access_log." suffix=".txt"
                     pattern="common" resolveHosts="false"/>
     
     
      --> 
      </Host>
      </Engine>
      </Service>
      </Server>
    voila en esperant qu'avec sa vous pourriez m'aider, je peux plus avancer sur mon prog

  10. #10
    Membre habitué Avatar de XristofGreek
    Inscrit en
    Août 2004
    Messages
    164
    Détails du profil
    Informations forums :
    Inscription : Août 2004
    Messages : 164
    Points : 174
    Points
    174
    Par défaut
    bon je ne connais pas netbeans mais visiblement il ajoute un autre fichier de configuration au fichier de base : server.xml, comme le fait JBuilder par exemple, il ajoute un fichier qui se nomme 'server8080.xml' si mes souvenirs sont bons.
    Donc tu dois avoir quelque part un fichier XML dans lequel il doit forcément y avoir cette ligne :
    <Context path="/retest"/>

    Si tu a fais la recherche sur ton ordinateur et que tu n'as pas trouvé cette ligne dans tout tes fichiers c'est que tu as mal fait ta recherche. Il faut que tu nous trouve cette ligne !
    les gens qui s'ennuient sont des gens sans imagination.

  11. #11
    Expert éminent

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Points : 7 778
    Points
    7 778
    Par défaut
    Moi non plus, je ne connais pas netbeans mais tu as raison XristofGreek, il doit y avoir un fichier, qui s'appelle peut-être retest.xml, dans lequel doit être défini le contexte retest.
    Sous Jonas par exemple, le fichier se trouve sous conf-> jonas -> localhost.

    Sinon, peux-tu nous mettre l'arborescence de ton projet ?
    Modératrice Java - Struts, Servlets/JSP, ...

  12. #12
    Membre à l'essai
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    53
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 53
    Points : 24
    Points
    24
    Par défaut
    le seul fichier ou je trouve cette ligne se trouve dans context.xml dans le repertoire :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    C:\Documents and Settings\Nissarte\Bureau\retest\web\META-INF\context.xml
    les fichiers xml present dans le répertoire de mon projet sont :
    build.xml
    build-impl.xml
    project.xml
    private.xml
    context.xml
    web.xml
    context.xml
    web.xml

    l'arborescence de mon projet est simple

    acceuil.jsp
    ---------------formulaire.jsp
    --------ServletInscription
    ---------------ServletAffichage
    ---------------login.jsp
    -------administrateur.jsp

    a partir de la page administrateur, possibilité de modifier ou supprimer des fiches de demandes d'intervention

  13. #13
    Expert éminent

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Points : 7 778
    Points
    7 778
    Par défaut
    Mais où se trouve le répertoire web dans l'arborescence de ton projet ?
    Modératrice Java - Struts, Servlets/JSP, ...

  14. #14
    Membre à l'essai
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    53
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 53
    Points : 24
    Points
    24
    Par défaut
    dans se dossier :C:\Documents and Settings\Nissarte\Bureau\retest

    les sous repertoires sont:
    build
    dist
    nbproject
    src
    test
    web

  15. #15
    Membre à l'essai
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    53
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 53
    Points : 24
    Points
    24
    Par défaut
    bientot 16h et j'ai toujours pas trouvé! c'est vraiment un mystere, le context path est clair, le repertoire web se trouve bien a l'interieur, donc le chemin est bon, je comprends vraiment pas

  16. #16
    Expert éminent

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Points : 7 778
    Points
    7 778
    Par défaut
    Le répertoire web, c'est toi qui l'as créé ou il est automatiquement créé par NetBeans ?

    S'il est créé par NetBeans, je te suggère de tester ceci :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <a href="<%=request.getContextPath()+response.encodeURL("/formulaire.jsp")%>">
    Modératrice Java - Struts, Servlets/JSP, ...

  17. #17
    Membre à l'essai
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    53
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 53
    Points : 24
    Points
    24
    Par défaut
    yes sa marche!! merci je suis a deux doigts de finir mon prog pour mon stage, sa me soulage que je peux lier mes pages jsp!
    merci de ton aide, si tu descends sur nice, je te paye un coup a boire!(euh en esperant que tu es loin, je suis un peu fauché en ce moment )
    merci de votre solidarité

  18. #18
    Expert éminent

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Points : 7 778
    Points
    7 778
    Par défaut
    C'est dommage, j'étais en déplacement à Sofia Antipolis la semaine dernière.
    Mais tu as de la chance (pour ton porte-monnaie), il n'est pas question que j'y retourne prochainement.

    Je pense que tu aurais gagné du temps en posant ta question sur le forum NetBeans.

    Bon courage pour la suite.

    PS : n'oublie pas le tag
    Modératrice Java - Struts, Servlets/JSP, ...

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

Discussions similaires

  1. Faire des liens hypertextes dans une page JSP
    Par kariel dans le forum Servlets/JSP
    Réponses: 1
    Dernier message: 17/07/2013, 10h37
  2. Réponses: 4
    Dernier message: 27/09/2011, 22h27
  3. Réponses: 9
    Dernier message: 09/07/2010, 14h32
  4. Réponses: 3
    Dernier message: 07/06/2009, 20h59
  5. [Débutant] Problème de déconnexion d'une page JSP
    Par amal9 dans le forum Servlets/JSP
    Réponses: 12
    Dernier message: 22/01/2004, 13h40

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