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

Struts 1 Java Discussion :

[Struts-Tiles] problème de définition


Sujet :

Struts 1 Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé

    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    639
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 639
    Par défaut [Struts-Tiles] problème de définition
    Bonjour,

    Je pense avoir bien configuré mes tiles dans mon appli, mais j'ai le message suivant quand je tente d'accéder a ma page d'accueil :

    javax.servlet.jsp.JspException: Can't get definitions factory from context.
    org.apache.struts.tiles.taglib.InsertTag.processDefinitionName(InsertTag.java:580)
    org.apache.struts.tiles.taglib.InsertTag.createTagHandler(InsertTag.java:479)
    org.apache.struts.tiles.taglib.InsertTag.doStartTag(InsertTag.java:441)
    org.apache.jsp.private_.index_jsp._jspx_meth_tiles_005finsert_005f0(index_jsp.java:78)
    org.apache.jsp.private_.index_jsp._jspService(index_jsp.java:54)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    il doit donc me manquer qqchose, mais quoi???
    merci!

  2. #2
    Membre éclairé

    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    639
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 639
    Par défaut
    Dans mon web.xml j'avais déclairer le plugin validator.
    Mais je n'avais pas le fichier validation.xml ni le validator-rules.xml dans web-inf.
    Maintenant ça marche.

  3. #3
    Membre éclairé

    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    639
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 639
    Par défaut
    Par contre autre erreur, voici ce que m'affiche ma page :
    Pièce jointe 37214
    Et le code html généré de la page :
    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
    <table border="1" width="800px" height="600px" cellspacing="0">
    	<col span="1" width="140px">
    	<col span="1" width="660px">
    	<tr>
    	  <td colspan="2" height="100px">
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
     
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <font color="#000088">	
    <H1><B><i>MEDIC</i></b><br/></H1></font>
    </body>
    </html>
    	  </td>
    	</tr>
    	<tr>
    	  <td valign="top" align="left">
     
    	    <table>
    	     <tr><td>
    	       <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    MENU
    </body>
    </html>
    	     </td></tr>
     
    	    </table>
    	  </td>
    	  <td valign="top"  align="left">
    	    <table>
    	     <tr><td>
    	 		<div style="overflow:auto;height:400px;width:660px">	      
     
     
    <table border="1" width="800px" height="600px" cellspacing="0">
    	<col span="1" width="140px">
    	<col span="1" width="660px">
     
    	<tr>
    	  <td colspan="2" height="100px">
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <font color="#000088">	
    <H1><B><i>MEDIC</i></b><br/></H1></font>
    </body>
     
    </html>
    	  </td>
    	</tr>
    	<tr>
    	  <td valign="top" align="left">
    	    <table>
    	     <tr><td>
    	       <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
     
    <title>Insert title here</title>
    </head>
    <body>
    MENU
    </body>
    </html>
    	     </td></tr>
    	    </table>
    	  </td>
    	  <td valign="top"  align="left">
    	    <table>
     
    	     <tr><td>
    	 		<div style="overflow:auto;height:400px;width:660px">
    Il s'arrete en plein milieu de mon template.jsp. Alors que le code de mon template c'est :
    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
    <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
    <%@ taglib uri="/WEB-INF/struts-layout.tld" prefix="layout" %>
    <table border="1" width="800px" height="600px" cellspacing="0">
    	<col span="1" width="140px">
    	<col span="1" width="660px">
    	<tr>
    	  <td colspan="2" height="100px">
    	      <tiles:insert attribute="header" />
    	  </td>
    	</tr>
    	<tr>
    	  <td valign="top" align="left">
    	    <table>
    	     <tr><td>
    	       <tiles:insert attribute='menu'/>
    	     </td></tr>
    	    </table>
    	  </td>
    	  <td valign="top"  align="left">
    	    <table>
    	     <tr><td>
    	 		<div style="overflow:auto;height:400px;width:660px">	      
    	           <tiles:insert attribute='body' />
    	   		</div>     
    	     </td></tr>
    	    </table>
    	  </td>
    	</tr>
    	<tr>
    	  <td colspan="2" height="100px">
    	     <tiles:insert attribute="footer" />
    	  </td>
    	</tr>
    </table>
    Savez vous pourquoi ça plante?
    Merci!

  4. #4
    Expert confirmé

    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
    Par défaut
    Salut

    Apparemment, il y a un problème à l'insertion du tile body.

    Peux-tu montrer le code de la jsp correspondante ?

  5. #5
    Membre éclairé

    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    639
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 639
    Par défaut
    Pour l instant c'est juste une page vide :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    	ACCUEIL
    </body>
    </html>

  6. #6
    Modérateur
    Avatar de OButterlin
    Homme Profil pro
    Inscrit en
    Novembre 2006
    Messages
    7 313
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 7 313
    Billets dans le blog
    1
    Par défaut
    Le code de ton template n'est pas très conforme à une page html, il manque :
    <html>
    <body>
    ... ici, tu peux mettre ton contenu actuel ...
    </body>
    </html>

    Ensuite, dans la définition de la page "body", on ne met plus ces directives, juste le contenu.

    A+
    N'oubliez pas de consulter les FAQ Java et les cours et tutoriels Java

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

Discussions similaires

  1. tiles, struts-layout, problème de cache sur jsp
    Par jadey dans le forum Struts 1
    Réponses: 3
    Dernier message: 04/12/2009, 12h55
  2. [Struts 1.3][Tiles] Problème de forward vers un Tiles
    Par lolla86 dans le forum Struts 1
    Réponses: 6
    Dernier message: 04/08/2009, 15h27
  3. [Struts Menu][Tiles] Problème d'utilisation
    Par newmar dans le forum Struts 1
    Réponses: 4
    Dernier message: 12/05/2008, 11h22
  4. problème avec struts-tiles
    Par osman.amine dans le forum Struts 1
    Réponses: 1
    Dernier message: 17/04/2007, 10h23
  5. [STRUTS][TILES] Problème sur actions génériques
    Par xv-mnt dans le forum Struts 1
    Réponses: 1
    Dernier message: 02/08/2005, 10h15

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