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 :

Problème avec la page incluse


Sujet :

Servlets/JSP Java

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    104
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 104
    Points : 61
    Points
    61
    Par défaut Problème avec la page incluse
    Bonjour tout le monde,

    Je suis entrain de faire un développement utilisant des tag jsp.J'ai une page jsp que j'ai appelé formulaire.jsp et dans cette page comme son nom l'indique j'ai des champs texte et des combobox.
    J'ai une combobox pays un champs code postal et un dernier combobox ville.Quand je selectionne ma combo pays et que je rentre un code postal un service web via est appelé pour remplir la combo ville avec la bonne donnée.
    Quand je test ma page formulaire de manière isolé ça marche bien.Mais quand j'inclu ma page formulaire dans ma page principale rien ne se produit et en plus j'ai pas d'erreur.
    Pour mes inclusion j'ai essayé tous les tags et c'est toujours le même résultat
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    <jsp:directive.include file="formulaire.jsp" />
    <%@ include file="formulaire.jsp" %>
    <jsp:include page ="formulaire.jsp" />
    Si quelqu'un peut me dire d'où peux provenir my blèm Merçi

  2. #2
    Membre averti Avatar de welcome_59
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Mars 2007
    Messages
    203
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Suisse

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2007
    Messages : 203
    Points : 352
    Points
    352
    Par défaut
    tu peux poster tout le code de la page incluante?
    SCJP 5 | CAPM

  3. #3
    Membre du Club
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    104
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 104
    Points : 61
    Points
    61
    Par défaut
    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
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <%@ taglib prefix="ria" uri="http://sweetdev-ria.ideotechnologies.com" %>
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ taglib prefix="c"   uri="http://java.sun.com/jstl/core" %>
    <%@page import="com.ideo.sweetdevria.taglib.control.ActionInterface"%>
    <%@page import="server.Server"%>
    <%@page import="server.ServerProxy"%>
    <%@page import="java.util.*"%>
    <%@page import="Bean.Article"%>
    <%@page import="com.bean.*"%>
    <jsp:useBean id="myBean" class="Bean.GestionJson" scope="request" />
    <jsp:useBean id="gmapBean" class="com.bean.GmapBean" scope="request" />
    
    <%@page import="java.util.HashMap"%>
    <%HashMap map= new HashMap(); 
    com.bean.RIABean myBean1 = new com.bean.RIABean();
    List l=new ArrayList();
    int m=0;
    %>
    <html>
    <head>
        <title>Sogeti</title>
     
        <link rel="stylesheet" href="http://10.226.78.208:81/css/structure_m1_str_m1.css" type="text/css" />
        <link rel="stylesheet" href="http://10.226.78.208:81/css/structure_m1_hab_m1.css" type="text/css" />
         <link rel="stylesheet" href="http://10.226.78.208:81/css/formulaire.css" type="text/css" />
        <ria:resourcesImport />
        <script type="text/javascript" src="http://10.226.78.208:81/js/sweetdev/hashtable.js">
        
        </script>
        <script src="http://10.226.78.208:81/js/gmap/gmap.js" type="text/javascript"></script>
        <script>
        var MonTableau = new Array();
        /*caddy de depart */
        var shopCart=new Hashtable();
        /* Panier de course */
        var shoppingCart=new Hashtable();
        shoppingCart.clear();
        var o = new ProArticle("ya","yo");
        MonTableau[0]=o;
        
        function ProArticle(nomArt,priceArt,idArt,idAddr)
    	{
    		this.nomArt=nomArt;
    		this.priceArt=priceArt;
    		this.idArt=idArt;
    		this.idAddr=idAddr;
    		this.quant=1;
    	}
        
     function gestionDragDrop()
     	{
     		
     	}  
    
    
    function calculTotal() {
    	var total=0;
    	for(var i= 0; i< shoppingCart.items.length;i++)
    	{
    		total += shoppingCart.items[i].quant * shoppingCart.items[i].priceArt;
    	}
    	shoppingCart.total = total;
    	document.getElementbyId("totalpanier").innerHTML = "Prix total : "+shoppingCart.total+" Euros";
    }
    
       function locAdress(param) 
    	{
    		var mydress="img";
    		mydress+=param;
    		mydress+="_drag";
    		if(param!=null)
    		showAddress(shopCart.get(mydress).idAddr)
    		else
    		   alert("selectionnez un article");
    	} 
    	
    	function supprimerArticle(param)
    		{
    		
    			var mydress="img";
    		mydress+=param;
    		mydress+="_drag";
    		alert (param)
    		if(param!=null)
    		{
    		if(shoppingCart.containsKey(mydress))
    			{
    		var data= new Array();
    		var m=0;	
    			 shoppingCart.remove(mydress);
    			var obj=shoppingCart.values();		
    						for(var j=0;j<shoppingCart.total;j++)
    							{
    							
    							var articl=obj[j];
    							if(articl!=null)
    							{
    							data[m]=[articl.idArt,articl.nomArt,articl.quant*articl.priceArt,articl.priceArt,articl.quant,null];
    							m++;
    							}
    							}
    					       
    							SweetDevRia.$("grid").setData(data);
    		}
    		else
    		   alert("selectionnez un article");
    		   
    	}	   
    		}
        </script>
      <style type="text/css">      
    .ideo-acc-headerBackground 
    {
    border-top-width: 1px;
    border-top-style: solid;
    border-top-color: #cc3300;
    height: 20px;
    background-color: #cc3300;
    background-image: url(../images/accordion/acc_header.gif);
    background-repeat: repeat-x;
    background-attachment: scroll;
    background-x-position: 0%;
    background-y-position: 0%;
    padding-top: 4px;
    padding-right: 0pt;
    padding-bottom: 0pt;
    padding-left: 6px;
    }
    </style>
    
    
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAARZiWCXWTZfUYuleZOexhABTwM0brOpm-All5BF6PoaKBxRWWERSZL9UXZtg8NvLkkXt1EZuB2W5yog" type="text/javascript"></script>
    
    	
    
    </head>
    <body onload="initialize()" onunload="GUnload()" >
    	
    	<!-- PAGE -->
    	<div id="Page">
    		<div id="Header"></div>
    		<div id="Middle">
    
    			<!-- TOP -->
    			<div id="Top">				
    				<div class="top_m1">
    					<a href="#"><img src="http://10.226.78.208:81/images/top_logo_fr.png" class="logo" alt="Logo" name="Logo"/></a>
    					<span class="action_rubrique">
    						<a href="#"><span>Cite Actu</span></a>
    						<span>
    							<span>|</span>
    
    						</span>
    						<a href="#">
    							<span>Revue de Presse</span>
    						</a>
    						<span><span>|</span></span>
    						<a href="#">
    							<span>Webmail Sogeti</span>
    
    						</a>
    						<span></span>
    					</span>
    				</div>
    				<div class="navigation_horizontale_m1">
    					<div>
    						<div>
    						<div id="myMenuID">
    						</div>
    
    						</div>
    					</div>
    				</div>
    				
    			</div>
    			<ria:tabbox style="height:800px;" id="tabboxsimple"> 
    			<ria:tabs>
    		        <ria:tab label="Boutique" removable="false" selected="true"></ria:tab>  
    		        <ria:tab label="Formulaire d'Inscription" removable="false"></ria:tab>  
    		      </ria:tabs> 
         		 <ria:tabpanels  height="800px" width="100%">
            			<ria:tabpanel> 
            			    
            			<ria:alert id="alert" type="error" actionType=""></ria:alert>
    				<div class="outer">
    						<div class="inner">
    
    							
    							<!-- LEFT COLUMM -->
    							<div id="Left">					
    								<div class="module">
    									<div class="nom">Magasin</div>
    									<div class="titre">Articles</div>
    									<span id="cadre" class="texte">
    									
       										
               
    									<ria:accordion  id="container" width="100%">
    									<% 
    									
    									
    									Server s;
    									s=new ServerProxy();
    									String jisonarticle=s.getArticles();
    									
    									map=myBean.ArticleJson(jisonarticle);
    									Set entree = map.keySet();
    									Iterator it=entree.iterator();
    									int parcours=0;
    									%>
    									
    								 <% 	while(it.hasNext()){
    										String cat=(String)it.next();
    										boolean open=false;
    										if(parcours==0)
    											open=true;
    										parcours+=1;
    										%>
    										
    									   <ria:accordionItem openAtStartup="<%=open%>" title="<%=cat%>"  contentStyleClass="ideo-acc-mycontent"> 
                            <%  l=(ArrayList)map.get(cat); 
                                 for(int i=0;i<l.size();i++){ 
                                       
                                       Article at=(Article)l.get(i); 
                                       String adress=gmapBean.getLocalisation(at.getAdress());
                                       
                                       %>  
                                       
                                  <script>  
                     
                                        var obj = new SweetDevRia.DD ("img"+<%=at.getId()%>+"_drag"); //You create a draggable object with an arbitrary id 
                                        obj.setDragId ("<%=at.getId()%>"); //You associate your object with each img tag with his id 
                                        obj.group = "images"; 
                                        obj.constraintId = "panier"; 
                                        obj.setFakeMode (SweetDevRia.DD.CLONE); 
                                        obj.delta = true; 
                                        obj.displayIcon = true; 
                                        
                                        obj.insertMode = SweetDevRia.DD.HORIZONTAL_INSERT;          
                                        obj.dragObjectClass = "selected"; 
                                        obj.overBeforeClass = "left"; 
                                        obj.overAfterClass = "right"; 
                       
    								var obArt=new ProArticle("<%=at.getNom()%>","<%=at.getPrice()%>","<%=at.getId()%>","<%=adress%>");
    								shopCart.put("img<%=at.getId()%>_drag",obArt);
                                  </script>      
                                   
                                <div id="<%=at.getId()%>" >  <%=at.getNom()%></div><br/> 
                                   <%}%> 
                                   
                                   </ria:accordionItem> 
    									   
    									<%open=false;} %>
    									
    									   </ria:accordion> 
    									  
    									</span>
    								
    					
    					
    					 
    								</div>
    							</div>
    							<!-- CENTER COLUMM -->
    							<div id="Center">
    								<div class="nom">Vos achats</div>
    								<div class="titre">blablabla</div>
    								<div class="categorie" id="totalpanier">Prix total :</div>
    								<!-- panier -->
    							
    		<%java.util.Collection myCollection = new java.util.ArrayList();
                    
    				 myCollection.add(myBean1);
                    request.setAttribute("collection",myCollection);
       
              %>
    		 <div id="panier"> 
    		 		<button onclick="supprimerArticle(SweetDevRia.$('grid').getSelection ());" > Suprimer Article</button>
    	
    				<button onclick="locAdress(SweetDevRia.$('grid').getSelection ());">Localisation</button> 
    		 		<input type="button" onclick="ShowAdress('rennes')" 
    				value="Commander" class="bouton" /> 
    		 		<div id="sel"></div>
    				<ria:simplegrid id="grid" collection="${collection}" rowPerPage="50"  selectionMode="single"
    				          var="prod" width="450" height="200" rowCountVar="rowCount" resizable="true" >
    				
    				<ria:simplegridcolumn label="Name" width="150">${prod.artistName}</ria:simplegridcolumn>
    				<ria:simplegridcolumn label="TotalCost" width="100">${prod.name}</ria:simplegridcolumn>
    				<ria:simplegridcolumn label="Price" width="75"
    				  >
    				   </ria:simplegridcolumn>
    				   <ria:simplegridcolumn  label="quantite" width="75"
    				    >
    				</ria:simplegridcolumn>
    				
    				</ria:simplegrid> 
    		 </div>
    		 <script type="text/javascript"> 
    		 
    			
    					new SweetDevRia.DD ("myDropableDiv"); 
    						SweetDevRia.$("myDropableDiv").setDragId ("panier"); 
    						SweetDevRia.$("myDropableDiv").group = "images"; 
    						SweetDevRia.$("myDropableDiv").canDrag = false; 
    						
    						SweetDevRia.$("myDropableDiv").onDrop = function(dragObject, dragPosition) 
    						{ 
    						/* verification de la pr?sence de l'?l?ment dans le caddy */
    						var data =new Array();
    						if(shoppingCart.containsKey(dragObject.id))
    							{
    								shoppingCart.get(dragObject.id).quant++;	
    							}
    							else
    								{
    								shoppingCart.put(dragObject.id,shopCart.get(dragObject.id));	
    								}
    								
    						var obj=shoppingCart.values();		
    						for(var j=0;j<shoppingCart.total;j++)
    							{
    							var articl=obj[j];
    							
    							data[j]=[articl.idArt,articl.nomArt,articl.quant*articl.priceArt,articl.priceArt,articl.quant,null];
    							
    							}
    					
    						
    						
    							SweetDevRia.$("grid").setData(data);
    
    						} 
    					 </script>  
    								<div class="nom">Map</div>
    								<div class="titre">Google</div>
    								<div class="categorie">Ceci est une carte</div>
    								<div id="map_canvas" style="width: 500px; height: 300px"></div>
    								
    							</div>
    
    						
    							<!-- RIGTH COLUMM -->
    							<div id="Right">
    								<div class="module">
    									<div class="nom">Login</div>
    	
    								<!--<div class="titre rouge">Title</div>-->
    	<jsp:include page="login.jsp"  />
    	
    								</div>
    								<div class="module">
    									<div class="nom">Commande</div>
    									<!--<div class="titre rouge">Title</div>-->
    
    									<span id="resultcmd" class="texte"></span>
    								</div>
    							</div>
    						</div>
    						<div class="clear"></div>
    					</div>
    				
    			</ria:tabpanel>
    				 <ria:tabpanel >
    				 <div class="nom">Localisation</div>
    				  <jsp:include page="Register.jsp"  /><br/>
    				 <div class="nom">Informations Personnelles</div>
    				 <div id="panelform">
    				 <jsp:include page="formulaire.jsp"  />
    				 </div>
    				 
    				 </ria:tabpanel>
          </ria:tabpanels> 
          </ria:tabbox>
    			<div id="Bottom">
    			<!-- BOTTOM -->
    				<div class="bottom_m1">
    					<span>intranet.fr.sogeti.com ? 2007</span> <span class="action_rubrique"> <a href="#"><span>Rechercher</span></a> <span><span>|</span></span> <a href="#"><span>Plan</span></a> <span><span>|</span></span> <a href="#"><span>Infos legales</span></a> <span></span></span>
    
    				</div>
    			</div>
    		</div>
    		<div id="Footer"> </div>
    	</div>
    </body>
    </html>
    J'ai mis la partie inclue en rouge pour plus de visibilité.Les autres parties ne doivent pas interessé

  4. #4
    Membre du Club
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    104
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 104
    Points : 61
    Points
    61
    Par défaut
    Bonjour ,
    C'est bon en fait le probléme était au niveau d'un id en double donc il ne savais pas lequel considéré.
    Merçi

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

Discussions similaires

  1. Problème avec les pages word de mon rapport
    Par minie dans le forum Word
    Réponses: 8
    Dernier message: 05/06/2007, 13h35
  2. [EasyPHP] EasyPHP 1.8 ... problème avec les pages en local !
    Par Franck.H dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 3
    Dernier message: 06/04/2007, 14h12
  3. (Petit ?) problème avec une page contenant du Flash
    Par ologram dans le forum Balisage (X)HTML et validation W3C
    Réponses: 2
    Dernier message: 01/09/2005, 18h45
  4. problème avec une page web sous firefox!
    Par 3psilOn dans le forum Balisage (X)HTML et validation W3C
    Réponses: 1
    Dernier message: 24/11/2004, 11h49

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