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 :

Pb avec web.xml et taglib


Sujet :

Servlets/JSP Java

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    62
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 62
    Points : 40
    Points
    40
    Par défaut Pb avec web.xml et taglib
    bonjour,
    jai une erreur dans mon web.xml ici des le debut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
    <taglib>
          <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
          <taglib-location>/WEB-INF/c.tld</taglib-location>
       </taglib>
    avec ca comme info d erreur
    cvc-complex-type.2.4.a: Invalid content starting with element 'taglib'. One of '{"http://java.sun.com/xml/ns/j2ee":description,
    "http://java.sun.com/xml/ns/j2ee":display-name, "http://java.sun.com/xml/ns/j2ee":icon,
    "http://java.sun.com/xml/ns/j2ee":distributable, "http://java.sun.com/xml/ns/j2ee":context-param,
    ....
    "http://java.sun.com/xml/ns/j2ee":message-destination,
    "http://java.sun.com/xml/ns/j2ee":locale-encoding-mapping-list}' is expected.
    d ou cela peut bien provenir ?

    voici le debut de ma jsp
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    <%@ page contentType="text/html"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <jsp:useBean id="usrBean" class="testco.UserBean" scope="request"/>
    <home>
    <c:forEach items="${usrBean.listuser}" var="table">
    [/b]

  2. #2
    Membre confirmé

    Inscrit en
    Avril 2005
    Messages
    317
    Détails du profil
    Informations forums :
    Inscription : Avril 2005
    Messages : 317
    Points : 553
    Points
    553
    Par défaut
    Ton web.xml n'est pas u bon format
    Essaye :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    <?xml version="1.0" encoding="ISO-8859-1"?>
     
    <!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
      "http://java.sun.com/dtd/web-app_2_3.dtd">
     
    <web-app>
       <taglib>
          <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
          <taglib-location>/WEB-INF/c.tld</taglib-location>
       </taglib> 
    </web-app>

  3. #3
    Membre du Club
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    62
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 62
    Points : 40
    Points
    40
    Par défaut
    hum moi j ai ca au debut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    <?xml version="1.0" encoding="ISO-8859-1"?>
     
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
    et si je met ce que tu ma dit apres toute les balises
    <servlet>,<context-param>,<display-name>, font des erreur :s

    es que vous connaisser un bon tutorial expliquant les fonction du fichier web.xml ?

  4. #4
    Rédacteur

    Profil pro
    Inscrit en
    Juin 2003
    Messages
    4 184
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 4 184
    Points : 5 059
    Points
    5 059
    Par défaut
    Citation Envoyé par Kpone
    hum moi j ai ca au debut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    <?xml version="1.0" encoding="ISO-8859-1"?>
     
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
    et si je met ce que tu ma dit apres toute les balises
    <servlet>,<context-param>,<display-name>, font des erreur :s

    es que vous connaisser un bon tutorial expliquant les fonction du fichier web.xml ?
    Tu travaille avec l'api des servlets 2.4, c'est bien de definir le xsd et non la dtd, par contre la syntaxe a un peu changé entre la verison 2.3 et 2.4, notamment avant la définition des taglibs.
    il faut faire:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    <jsp-config>
    <taglib/>
    </jsp-config>

  5. #5
    Membre du Club
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    62
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 62
    Points : 40
    Points
    40
    Par défaut
    cool merci c'etait bien ca mon erreur

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

Discussions similaires

  1. [DEBUTANT]Problème de deployement avec web.xml
    Par kore62 dans le forum Servlets/JSP
    Réponses: 10
    Dernier message: 06/08/2007, 14h54
  2. [Web.xml] Balise taglib non reconnue
    Par Mister Nono dans le forum Servlets/JSP
    Réponses: 2
    Dernier message: 05/07/2007, 16h33
  3. probleme avec web.xml
    Par hamham dans le forum JOnAS
    Réponses: 2
    Dernier message: 20/04/2007, 13h33
  4. [Tomcat]probleme avec web.xml
    Par The_freeman dans le forum Tomcat et TomEE
    Réponses: 6
    Dernier message: 25/01/2006, 22h32
  5. [Tomcat] Problème avec web.xml
    Par hichamus dans le forum Eclipse Java
    Réponses: 2
    Dernier message: 01/03/2005, 16h57

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