Impossible d'ajouter un id au champ JSP

Fermé
e.khalil Messages postés 33 Date d'inscription lundi 1 juin 2009 Statut Membre Dernière intervention 15 mai 2010 - Modifié par jipicy le 11/04/2010 à 09:37
 Utilisateur anonyme - 12 avril 2010 à 20:45
Bonjour, je suis entrain de développer une application avec Java et Struts et j'ai du mal a attribuer un id pour des champs d'une page JSP, j'aimerais faire afficher un message dans une <span></span> de telle manière de vérifier deux champs de mot de passes si sont égaux ou pas. Voila les codes des deux fichiers:
inscrire.jsp :

<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>

<html>
<head>
<title>Inscription</title>
<link rel="stylesheet" type="text/css" href="styles/style.css">

</head>
<body>
<div class="site">
<%@ include file = "/jspf/head.jspf" %>
<div class="corp">
<%@ include file = "/jspf/contentleft.jspf" %>
<div class="corp_ctn">
<h1>S'inscrire</h1>
<center>
<html:form action="/inscrire">
<table>
<tr><td>login</td><td><html:text property="login"/><html:errors property="login"/></td></tr>
<tr><td>pass</td><td><html:password property="pass" id="pass1"/><html:errors property="pass"/></td></tr>
<tr><td>confirmer pass</td><td><html:password property="confirmPass" id="pass2"/><html:errors property="confirmPass"/></td><td><span id="confPass"></span></td></tr>
<tr><td>nom</td><td><html:text property="nom"/><html:errors property="nom"/></td></tr>
<tr><td>prenom</td><td><html:text property="prenom"/><html:errors property="prenom"/></td></tr>
<tr><td>ville</td><td><html:text property="ville"/><html:errors property="ville"/></td></tr>
<tr><td>pays</td><td><html:text property="pays"/><html:errors property="pays"/></td></tr>
<tr><td>adresse</td><td><html:text property="adresse"/><html:errors property="adresse"/></td></tr>
<tr><td>codePostal</td><td><html:text property="codePostal"/><html:errors property="codePostal"/></td></tr>
<tr><td>email</td><td><html:text property="email"/><html:errors property="email"/></td></tr>
</table>
<html:submit/><html:cancel/>
</html:form>
</center>
</div>
</div>
<div class="clean"></div>
<%@ include file = "/jspf/footer.jspf" %>
</div>
</body>
</html>

l'erreur de TomCat:

type Rapport d'exception

message

description Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête.

exception

org.apache.jasper.JasperException: /inscrire.jsp(31,26) L'attribut id est incorrect pour le tag password d'après la TLD indiquée
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:236)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1198)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:819)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:838)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
org.apache.jasper.compiler.Validator.validate(Validator.java:1737)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)



A voir également:

1 réponse

Utilisateur anonyme
12 avril 2010 à 20:45
salut
la taglib html ne supporte pas l attribut id pour l element password.
Renseigne toi sur internet sur les possibilité de cette taglib
a+
0