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 :

Rendu HTML en double


Sujet :

Servlets/JSP Java

  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    31
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 31
    Par défaut Rendu HTML en double
    Bonsoir, je débute en JEE et j'ai un problème de compilation avec la page index.jsp. Le code de la page est très simple il s'agit de 2 directives include pour l'entête et le pied de page.
    Je vous met la servlet créée après compilation.
    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
    package org.apache.jsp;
     
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.jsp.*;
     
    public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase
        implements org.apache.jasper.runtime.JspSourceDependent {
     
      private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
     
      private static java.util.List _jspx_dependants;
     
      static {
        _jspx_dependants = new java.util.ArrayList(3);
        _jspx_dependants.add("/vues/outils/entete.jspf");
        _jspx_dependants.add("/vues/outils/navigation.jspf");
        _jspx_dependants.add("/vues/outils/piedpage.jspf");
      }
     
      private javax.el.ExpressionFactory _el_expressionfactory;
      private org.apache.AnnotationProcessor _jsp_annotationprocessor;
     
      public Object getDependants() {
        return _jspx_dependants;
      }
     
      public void _jspInit() {
        _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
        _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());
      }
     
      public void _jspDestroy() {
      }
     
      public void _jspService(HttpServletRequest request, HttpServletResponse response)
            throws java.io.IOException, ServletException {
     
        PageContext pageContext = null;
        HttpSession session = null;
        ServletContext application = null;
        ServletConfig config = null;
        JspWriter out = null;
        Object page = this;
        JspWriter _jspx_out = null;
        PageContext _jspx_page_context = null;
     
     
        try {
          response.setContentType("text/html");
          pageContext = _jspxFactory.getPageContext(this, request, response,
          			null, true, 8192, true);
          _jspx_page_context = pageContext;
          application = pageContext.getServletContext();
          config = pageContext.getServletConfig();
          session = pageContext.getSession();
          out = pageContext.getOut();
          _jspx_out = out;
     
          out.write("<html>\n");
          out.write("    <head>\n");
          out.write("        <title>BetaBoutique</title>\n");
          out.write("        <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
          out.write("        <meta name=\"description\" content=\"BetaBoutique\">\n");
          out.write("        <!-- Feuilles de styles -->\n");
          out.write("        <link rel=\"stylesheet\" type=\"text/css\" href=\"css/styles.css\" title=\"default\"/>\n");
          out.write("        <link rel=\"stylesheet\" type=\"text/css\" href=\"css/styles_panier.css\" title=\"default\"/>\n");
          out.write("        <!-- javascript -->\n");
          out.write("        <link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"javascript/jtip/jtip.css\"/>\n");
          out.write("        <script type=\"text/javascript\" src=\"javascrip/jquery/jquery.js\"></script>\n");
          out.write("        <script type=\"text/javascript\" src=\"javascript/jtip/jtip.js\"></script>\n");
          out.write("    </head>\n");
          out.write("    <body>\n");
          out.write("\n");
          out.write("        <div id=\"global\">\n");
          out.write("            <div id=\"entete\">\n");
          out.write("            <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" height=\"100%\">\n");
          out.write("                    <tr>\n");
          out.write("                        <td align=\"left\" valign=\"top\">\n");
          out.write("                            <a href=\"/\"><img src=\"img/application/bandeau_haut_gauche.jpg\" border=\"0\"/></a>\n");
          out.write("                        </td>\n");
          out.write("\n");
          out.write("                        <td align=\"left\" valign=\"top\">\n");
          out.write("                            <img src=\"img/application/bandeau_haut_centre.jpg\"/>\n");
          out.write("                        </td>\n");
          out.write("\n");
          out.write("                        <td align=\"left\" valign=\"top\" background=\"img/application/bandeau_haut_droite.jpg\" width=\"222\">\n");
          out.write("                            <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" height=\"100%\">\n");
          out.write("                                <tr><td height=\"50\">\n");
          out.write("                                   <form id=\"formulairerecherche\" name=\"formulairerecherche\" action=\"\" methode=\"post\">\n");
          out.write("                                       <div class=\"titregris\">RECHERCHE</div>\n");
          out.write("                                       <input type=\"text\" id=\"recherche\" name=\"recherche\" value=\"\"/>\n");
          out.write("                                       <input type=\"image\" src=\"img/application/ok.gif\" align=\"absmiddle\"/>\n");
          out.write("                                   </form>\n");
          out.write("                                </td></tr>\n");
          out.write("                                <tr><td align=\"center\">\n");
          out.write("                                        <span class=\"liengris\"><a href=\"\">MON COMPTE</a></span>\n");
          out.write("                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n");
          out.write("                                        <span class=\"liengris\"><a href=\"\">MON PANIER></a></span>\n");
          out.write("                                </td></tr>\n");
          out.write("                                <tr><td align=\"right\" height=\"20\">\n");
          out.write("                                        <span class=\"liengris\"><a href=\"\">DECONNEXION</a>&nbsp;</span></br></br>\n");
          out.write("                                    </td></tr>\n");
          out.write("                            </table>\n");
          out.write("                        </td>\n");
          out.write("                    </tr>\n");
          out.write("            </table>\n");
          out.write("        </div>\n");
          out.write("\n");
          out.write("        <div id=\"contenu\">\n");
          out.write("            <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n");
          out.write("                <tr>\n");
          out.write("                    <td valign=\"top\" width=\"200\">\n");
          out.write("                        <!-- Colonne de gauche -->\n");
          out.write("                        ");
          out.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" name=\"menugauche\" id=\"menugauche\" style=\"background: url('img/application/fondmenu.gif') repeat-x;\" height=\"500\">\n");
          out.write("    <tr>\n");
          out.write("        <td width=\"100%\" valign=\"top\">\n");
          out.write("            <ul class=\"menucategorie\">\n");
          out.write("                <li><a href=\"\"><img src=\"img/application/fleche.gif\" border=\"0\" align=\"absmiddle\"/>&nbsp;Policier et Thriller</a></li>\n");
          out.write("                <li><a href=\"\"><img src=\"img/application/fleche.gif\" border=\"0\" align=\"absmiddle\"/>&nbsp;Com&eacute;die</a></li>\n");
          out.write("                <li><a href=\"\"><img src=\"img/application/fleche.gif\" border=\"0\" align=\"absmiddle\"/>&nbsp;Documentaires</a></li>\n");
          out.write("                <li><a href=\"\"><img src=\"img/application/fleche.gif\" border=\"0\" align=\"absmiddle\"/>&nbsp;Jeunesse et Famille</a></li>\n");
          out.write("                <li><a href=\"\"><img src=\"img/application/fleche.gif\" border=\"0\" align=\"absmiddle\"/>&nbsp;S&eacute;rie TV</a></li>\n");
          out.write("                <li><a href=\"\"><img src=\"img/application/fleche.gif\" border=\"0\" align=\"absmiddle\"/>&nbsp;Spectacle et humour</a></li>\n");
          out.write("                <li><a href=\"\"><img src=\"img/application/fleche.gif\" border=\"0\" align=\"absmiddle\"/>&nbsp;Fantastique</a></li>\n");
          out.write("            </ul>\n");
          out.write("        </td>\n");
          out.write("    </tr>\n");
          out.write("    <tr>\n");
          out.write("        <td valign=\"top\" align=\"center\" bgcolor=\"#ffce00\" height=\"50\" class=\"textpanier\">\n");
          out.write("            <a href=\"panierresume.php?width=400\" class=\"jTip\" id=\"aidedynamique\" name=\"Panier Dynamique\" onclick=\"javascript:window.location='';\">\n");
          out.write("                <img src=\"img/application/panier.gif\" border=\"0\" style=\"padding-top:10px;\"/><span>Panier</span>\n");
          out.write("            </a>\n");
          out.write("            </br>\n");
          out.write("        </td>\n");
          out.write("    </tr>\n");
          out.write("    <tr>\n");
          out.write("        <td align=\"center\">\n");
          out.write("            <img src=\"img/application/cartes.gif\" border=\"0\" style=\"margin-bottom:5px;\"/></br>\n");
          out.write("        </td>\n");
          out.write("    </tr>\n");
          out.write("</table>");
          out.write("\n");
          out.write("                    </td>\n");
          out.write("\n");
          out.write("                    <!-- Colonne centre -->\n");
          out.write("                    <td valign=\"top\" width=\"100%\" style=\"padding-left:5px\">\n");
          out.write("                        <ul id=\"menuhaut\">\n");
          out.write("                            <li><a href=\"/\" title=\"Acceuil\">Acceuil</a></li>\n");
          out.write("                            <li><a href=\"\" title=\"Promotion\">Promotion</a></li>\n");
          out.write("                            <li><a href=\"\" title=\"Nouveau&eacute;s\">Nouveaut&eacute;s</a></li>\n");
          out.write("                            <li><a href=\"\" title=\"CGV\">Conditions de vente</a></li>\n");
          out.write("                            <li><a href=\"\" title=\"Panier\">Commander</a></li>\n");
          out.write("                        </ul></br>\n");
          out.write("\n");
          out.write('\n');
          out.write('\n');
          out.write('\n');
          out.write("<html>\n");
          out.write("    <head>\n");
          out.write("        <title>BetaBoutique</title>\n");
          out.write("        <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
          out.write("        <meta name=\"description\" content=\"BetaBoutique\">\n");
          out.write("        <!-- Feuilles de styles -->\n");
          out.write("        <link rel=\"stylesheet\" type=\"text/css\" href=\"css/styles.css\" title=\"default\"/>\n");
          out.write("        <link rel=\"stylesheet\" type=\"text/css\" href=\"css/styles_panier.css\" title=\"default\"/>\n");
          out.write("        <!-- javascript -->\n");
          out.write("        <link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"javascript/jtip/jtip.css\"/>\n");
          out.write("        <script type=\"text/javascript\" src=\"javascrip/jquery/jquery.js\"></script>\n");
          out.write("        <script type=\"text/javascript\" src=\"javascript/jtip/jtip.js\"></script>\n");
          out.write("    </head>\n");
          out.write("    <body>\n");
          out.write("\n");
          out.write("        <div id=\"global\">\n");
          out.write("            <div id=\"entete\">\n");
          out.write("            <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" height=\"100%\">\n");
          out.write("                    <tr>\n");
          out.write("                        <td align=\"left\" valign=\"top\">\n");
          out.write("                            <a href=\"/\"><img src=\"img/application/bandeau_haut_gauche.jpg\" border=\"0\"/></a>\n");
          out.write("                        </td>\n");
          out.write("\n");
          out.write("                        <td align=\"left\" valign=\"top\">\n");
          out.write("                            <img src=\"img/application/bandeau_haut_centre.jpg\"/>\n");
          out.write("                        </td>\n");
          out.write("\n");
          out.write("                        <td align=\"left\" valign=\"top\" background=\"img/application/bandeau_haut_droite.jpg\" width=\"222\">\n");
          out.write("                            <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" height=\"100%\">\n");
          out.write("                                <tr><td height=\"50\">\n");
          out.write("                                   <form id=\"formulairerecherche\" name=\"formulairerecherche\" action=\"\" methode=\"post\">\n");
          out.write("                                       <div class=\"titregris\">RECHERCHE</div>\n");
          out.write("                                       <input type=\"text\" id=\"recherche\" name=\"recherche\" value=\"\"/>\n");
          out.write("                                       <input type=\"image\" src=\"img/application/ok.gif\" align=\"absmiddle\"/>\n");
          out.write("                                   </form>\n");
          out.write("                                </td></tr>\n");
          out.write("                                <tr><td align=\"center\">\n");
          out.write("                                        <span class=\"liengris\"><a href=\"\">MON COMPTE</a></span>\n");
          out.write("                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n");
          out.write("                                        <span class=\"liengris\"><a href=\"\">MON PANIER></a></span>\n");
          out.write("                                </td></tr>\n");
          out.write("                                <tr><td align=\"right\" height=\"20\">\n");
          out.write("                                        <span class=\"liengris\"><a href=\"\">DECONNEXION</a>&nbsp;</span></br></br>\n");
          out.write("                                    </td></tr>\n");
          out.write("                            </table>\n");
          out.write("                        </td>\n");
          out.write("                    </tr>\n");
          out.write("            </table>\n");
          out.write("        </div>\n");
          out.write("\n");
          out.write("        <div id=\"contenu\">\n");
          out.write("            <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n");
          out.write("                <tr>\n");
          out.write("                    <td valign=\"top\" width=\"200\">\n");
          out.write("                        <!-- Colonne de gauche -->\n");
          out.write("                        ");
          out.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" name=\"menugauche\" id=\"menugauche\" style=\"background: url('img/application/fondmenu.gif') repeat-x;\" height=\"500\">\n");
          out.write("    <tr>\n");
          out.write("        <td width=\"100%\" valign=\"top\">\n");
          out.write("            <ul class=\"menucategorie\">\n");
          out.write("                <li><a href=\"\"><img src=\"img/application/fleche.gif\" border=\"0\" align=\"absmiddle\"/>&nbsp;Policier et Thriller</a></li>\n");
          out.write("                <li><a href=\"\"><img src=\"img/application/fleche.gif\" border=\"0\" align=\"absmiddle\"/>&nbsp;Com&eacute;die</a></li>\n");
          out.write("                <li><a href=\"\"><img src=\"img/application/fleche.gif\" border=\"0\" align=\"absmiddle\"/>&nbsp;Documentaires</a></li>\n");
          out.write("                <li><a href=\"\"><img src=\"img/application/fleche.gif\" border=\"0\" align=\"absmiddle\"/>&nbsp;Jeunesse et Famille</a></li>\n");
          out.write("                <li><a href=\"\"><img src=\"img/application/fleche.gif\" border=\"0\" align=\"absmiddle\"/>&nbsp;S&eacute;rie TV</a></li>\n");
          out.write("                <li><a href=\"\"><img src=\"img/application/fleche.gif\" border=\"0\" align=\"absmiddle\"/>&nbsp;Spectacle et humour</a></li>\n");
          out.write("                <li><a href=\"\"><img src=\"img/application/fleche.gif\" border=\"0\" align=\"absmiddle\"/>&nbsp;Fantastique</a></li>\n");
          out.write("            </ul>\n");
          out.write("        </td>\n");
          out.write("    </tr>\n");
          out.write("    <tr>\n");
          out.write("        <td valign=\"top\" align=\"center\" bgcolor=\"#ffce00\" height=\"50\" class=\"textpanier\">\n");
          out.write("            <a href=\"panierresume.php?width=400\" class=\"jTip\" id=\"aidedynamique\" name=\"Panier Dynamique\" onclick=\"javascript:window.location='';\">\n");
          out.write("                <img src=\"img/application/panier.gif\" border=\"0\" style=\"padding-top:10px;\"/><span>Panier</span>\n");
          out.write("            </a>\n");
          out.write("            </br>\n");
          out.write("        </td>\n");
          out.write("    </tr>\n");
          out.write("    <tr>\n");
          out.write("        <td align=\"center\">\n");
          out.write("            <img src=\"img/application/cartes.gif\" border=\"0\" style=\"margin-bottom:5px;\"/></br>\n");
          out.write("        </td>\n");
          out.write("    </tr>\n");
          out.write("</table>");
          out.write("\n");
          out.write("                    </td>\n");
          out.write("\n");
          out.write("                    <!-- Colonne centre -->\n");
          out.write("                    <td valign=\"top\" width=\"100%\" style=\"padding-left:5px\">\n");
          out.write("                        <ul id=\"menuhaut\">\n");
          out.write("                            <li><a href=\"/\" title=\"Acceuil\">Acceuil</a></li>\n");
          out.write("                            <li><a href=\"\" title=\"Promotion\">Promotion</a></li>\n");
          out.write("                            <li><a href=\"\" title=\"Nouveau&eacute;s\">Nouveaut&eacute;s</a></li>\n");
          out.write("                            <li><a href=\"\" title=\"CGV\">Conditions de vente</a></li>\n");
          out.write("                            <li><a href=\"\" title=\"Panier\">Commander</a></li>\n");
          out.write("                        </ul></br>\n");
          out.write("\n");
          out.write('\n');
          out.write("</td>\n");
          out.write("</tr>\n");
          out.write("</table>\n");
          out.write("<div id=\"betaboutique\">\n");
          out.write("    BetaBoutique est une boutique de et par la soci&eacute;t&eacute; BetaBoutique SARL au\n");
          out.write("    Capital de 10 000 Euro num&eacute;ro de siret 111 222 333 444 555\n");
          out.write("</div>\n");
          out.write("</div>\n");
          out.write("</body>\n");
          out.write("</html>\n");
          out.write("</td>\n");
          out.write("</tr>\n");
          out.write("</table>\n");
          out.write("<div id=\"betaboutique\">\n");
          out.write("    BetaBoutique est une boutique de et par la soci&eacute;t&eacute; BetaBoutique SARL au\n");
          out.write("    Capital de 10 000 Euro num&eacute;ro de siret 111 222 333 444 555\n");
          out.write("</div>\n");
          out.write("</div>\n");
          out.write("</body>\n");
          out.write("</html>\n");
        } catch (Throwable t) {
          if (!(t instanceof SkipPageException)){
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
              try { out.clearBuffer(); } catch (java.io.IOException e) {}
            if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
          }
        } finally {
          _jspxFactory.releasePageContext(_jspx_page_context);
        }
      }
    }
    Je rajoute le fichier web.xml.
    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
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
     
        <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
        <error-page>
            <error-code>404</error-code>
            <location>/404.html</location>
        </error-page>
            <jsp-config>
                <jsp-property-group>
                    <url-pattern>*.jsp</url-pattern>
                    <include-prelude>/vues/outils/entete.jspf</include-prelude>
                    <include-coda>/vues/outils/piedpage.jspf</include-coda>
                </jsp-property-group>
            </jsp-config>
    </web-app>
    Pour situer les choses, tout fonctionnait correctement jusqu'à ce que je met en place la librairie JSTL 1.1 . Une première fois avec le menu contextuel de Netbeans, puis manuelement avec les fichiers jstl.jar et standard.jar dans le dossier WEB-INF.
    Voilà pour moi mon fichier web.xml est bon, du moins c'est celui que j'utilisais pendant que tout fonctionnait. Merci de votre aide.

  2. #2
    Expert éminent
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 45
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Par défaut
    Citation Envoyé par goyav2002 Voir le message
    Bonsoir, je débute en JEE et j'ai un problème de compilation avec la page index.jsp.
    Quel problème?

  3. #3
    Membre averti
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    31
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 31
    Par défaut
    J'ai deux fois le rendu HTML, ma page s'affiche deux fois l'une sur l'autre ( je sais pas si je suis clair ), toute la déclaration html est en double.

  4. #4
    Expert éminent
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 45
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Par défaut
    on peut voir le jsp? parce que le jsp pret à etre compilé c'est assez indigeste.

  5. #5
    Membre averti
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    31
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 31
    Par défaut
    Voici le fichier index.jsp:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    <%@include file="vues/outils/entete.jspf" %>
    <%@include file="vues/outils/piedpage.jspf" %>
    entete.jspf
    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
    <html>
        <head>
            <title>BetaBoutique</title>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <meta name="description" content="BetaBoutique">
            <!-- Feuilles de styles -->
            <link rel="stylesheet" type="text/css" href="css/styles.css" title="default"/>
            <link rel="stylesheet" type="text/css" href="css/styles_panier.css" title="default"/>
            <!-- javascript -->
            <link type="text/css" rel="stylesheet" media="all" href="javascript/jtip/jtip.css"/>
            <script type="text/javascript" src="javascrip/jquery/jquery.js"></script>
            <script type="text/javascript" src="javascript/jtip/jtip.js"></script>
        </head>
        <body>
     
            <div id="global">
                <div id="entete">
                <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
                        <tr>
                            <td align="left" valign="top">
                                <a href="/"><img src="img/application/bandeau_haut_gauche.jpg" border="0"/></a>
                            </td>
     
                            <td align="left" valign="top">
                                <img src="img/application/bandeau_haut_centre.jpg"/>
                            </td>
     
                            <td align="left" valign="top" background="img/application/bandeau_haut_droite.jpg" width="222">
                                <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
                                    <tr><td height="50">
                                       <form id="formulairerecherche" name="formulairerecherche" action="" methode="post">
                                           <div class="titregris">RECHERCHE</div>
                                           <input type="text" id="recherche" name="recherche" value=""/>
                                           <input type="image" src="img/application/ok.gif" align="absmiddle"/>
                                       </form>
                                    </td></tr>
                                    <tr><td align="center">
                                            <span class="liengris"><a href="">MON COMPTE</a></span>
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            <span class="liengris"><a href="">MON PANIER></a></span>
                                    </td></tr>
                                    <tr><td align="right" height="20">
                                            <span class="liengris"><a href="">DECONNEXION</a>&nbsp;</span></br></br>
                                        </td></tr>
                                </table>
                            </td>
                        </tr>
                </table>
            </div>
     
            <div id="contenu">
                <table border="0" cellspacing="0" cellpadding="0" width="100%">
                    <tr>
                        <td valign="top" width="200">
                            <!-- Colonne de gauche -->
                            <%@include file="navigation.jspf" %>
                        </td>
     
                        <!-- Colonne centre -->
                        <td valign="top" width="100%" style="padding-left:5px">
                            <ul id="menuhaut">
                                <li><a href="/" title="Acceuil">Acceuil</a></li>
                                <li><a href="" title="Promotion">Promotion</a></li>
                                <li><a href="" title="Nouveau&eacute;s">Nouveaut&eacute;s</a></li>
                                <li><a href="" title="CGV">Conditions de vente</a></li>
                                <li><a href="" title="Panier">Commander</a></li>
                            </ul></br>
    navigation.jspf
    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
    <table border="0" cellspacing="0" cellpadding="0" name="menugauche" id="menugauche" style="background: url('img/application/fondmenu.gif') repeat-x;" height="500">
        <tr>
            <td width="100%" valign="top">
                <ul class="menucategorie">
                    <li><a href=""><img src="img/application/fleche.gif" border="0" align="absmiddle"/>&nbsp;Policier et Thriller</a></li>
                    <li><a href=""><img src="img/application/fleche.gif" border="0" align="absmiddle"/>&nbsp;Com&eacute;die</a></li>
                    <li><a href=""><img src="img/application/fleche.gif" border="0" align="absmiddle"/>&nbsp;Documentaires</a></li>
                    <li><a href=""><img src="img/application/fleche.gif" border="0" align="absmiddle"/>&nbsp;Jeunesse et Famille</a></li>
                    <li><a href=""><img src="img/application/fleche.gif" border="0" align="absmiddle"/>&nbsp;S&eacute;rie TV</a></li>
                    <li><a href=""><img src="img/application/fleche.gif" border="0" align="absmiddle"/>&nbsp;Spectacle et humour</a></li>
                    <li><a href=""><img src="img/application/fleche.gif" border="0" align="absmiddle"/>&nbsp;Fantastique</a></li>
                </ul>
            </td>
        </tr>
        <tr>
            <td valign="top" align="center" bgcolor="#ffce00" height="50" class="textpanier">
                <a href="panierresume.php?width=400" class="jTip" id="aidedynamique" name="Panier Dynamique" onclick="javascript:window.location='';">
                    <img src="img/application/panier.gif" border="0" style="padding-top:10px;"/><span>Panier</span>
                </a>
                </br>
            </td>
        </tr>
        <tr>
            <td align="center">
                <img src="img/application/cartes.gif" border="0" style="margin-bottom:5px;"/></br>
            </td>
        </tr>
    </table>
    piedpage.jspf
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    </td>
    </tr>
    </table>
    <div id="betaboutique">
        BetaBoutique est une boutique de et par la soci&eacute;t&eacute; BetaBoutique SARL au
        Capital de 10 000 Euro num&eacute;ro de siret 111 222 333 444 555
    </div>
    </div>
    </body>
    </html>
    C'est la partie des out.write dans la servlet qui est importante, on voit que toute la page HTML est decrite entièrement puis une seconde fois à la fin de la première.

    Merci pour les réponses.

  6. #6
    Expert éminent
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 45
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Par défaut
    Citation Envoyé par goyav2002 Voir le message
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
                <jsp-property-group>
                    <url-pattern>*.jsp</url-pattern>
                    <include-prelude>/vues/outils/entete.jspf</include-prelude>
                    <include-coda>/vues/outils/piedpage.jspf</include-coda>
                </jsp-property-group>
    Voici le fichier index.jsp:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    <%@include file="vues/outils/entete.jspf" %>
    <%@include file="vues/outils/piedpage.jspf" %>
    Comme tu peux le voir maintenant que c'est mis cote à cote, tu fais 2 fois l'insertion des entete/pieds: une fois dans le jsp, une fois dans le jsp-property-group

  7. #7
    Membre averti
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    31
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 31
    Par défaut
    Je pensais que c'était en complément la déclaration dans le fichier web.xml. Merci pour tes réponses.

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

Discussions similaires

  1. Moteur de Rendu HTML Gecko?
    Par slayer418 dans le forum Autres langages pour le Web
    Réponses: 5
    Dernier message: 17/06/2009, 10h40
  2. SilverLight 2 - troncature dans le rendu HTML
    Par eagleleader dans le forum Silverlight
    Réponses: 4
    Dernier message: 11/03/2009, 11h07
  3. Rendu Html et mise en page dynamique dans flash
    Par grav dans le forum ActionScript 3
    Réponses: 0
    Dernier message: 21/12/2008, 12h27
  4. [itext]même code, rendu HTML et PDF différent
    Par kisame dans le forum Documents
    Réponses: 2
    Dernier message: 04/08/2008, 19h09
  5. [XSLT] inserer un espace dans le rendu html
    Par hysah dans le forum XSL/XSLT/XPATH
    Réponses: 5
    Dernier message: 04/11/2006, 11h45

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