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

JSF Java Discussion :

Problème de Facelets


Sujet :

JSF Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé Avatar de H-bil
    Inscrit en
    Février 2006
    Messages
    337
    Détails du profil
    Informations forums :
    Inscription : Février 2006
    Messages : 337
    Par défaut Problème de Facelets
    Salut
    j'essaie de créer mon premier exemple jsf/Facelets sous Eclipse/JBoss-5.0.1 en utilisant JBoss Tools.
    j'ai crée un nouveau projet come suite:
    JSF Environment : JSF 1.2 with Faclets
    Template : FacletsKickStartWithoutLibs

    J'ai eu les erreurs suivantes just aprés la création du nouveau projet:
    20:48:43,379 INFO [TomcatDeployment] deploy, ctxPath=/untest
    20:48:47,084 WARN [config] JSF1059: WARNING! The com.sun.faces.verifyObjects feature is to aid developers not using tools. It shouldn''t be enabled if using an IDE, or if this application is being deployed for production as it will impact application start times.
    20:48:48,051 ERROR [managedbean] JSF will be unable to create managed bean person when it is requested. The following problems where found:
    - Bean or property class demo.Person for managed bean person cannot be found.
    et en lançant l'aapli j'au eu ces erreurs
    20:54:58,446 ERROR [compiler] Missing Built-in Tag Libraries! Make sure they are included within the META-INF directory of Facelets' Jar
    20:54:58,967 ERROR [viewhandler] Error Rendering View[/pages/inputname.xhtml]
    java.lang.NullPointerException
    at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
    at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
    at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
    at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:510)
    at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:553)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:444)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)
    at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:696)
    at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:667)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:59)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
    web.xml :
    Code xml : 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
     
    <?xml version="1.0"?>
    <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">
     <description>Facelets StarterKit</description>
     <display-name>untest</display-name>
     <context-param>
      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
      <param-value>.xhtml</param-value>
     </context-param>
     <context-param>
      <param-name>facelets.REFRESH_PERIOD</param-name>
      <param-value>2</param-value>
     </context-param>
     <context-param>
      <param-name>facelets.DEVELOPMENT</param-name>
      <param-value>true</param-value>
     </context-param>
     <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>client</param-value>
     </context-param>
     <context-param>
      <param-name>com.sun.faces.validateXml</param-name>
      <param-value>true</param-value>
     </context-param>
     <context-param>
      <param-name>com.sun.faces.verifyObjects</param-name>
      <param-value>true</param-value>
     </context-param>
     <servlet>
      <servlet-name>Faces Servlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
     </servlet>
     <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.jsf</url-pattern>
     </servlet-mapping>
     <login-config>
      <auth-method>BASIC</auth-method>
     </login-config>
    </web-app>

    faces-config.xml :
    Code xml : 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
     
    <?xml version="1.0" encoding="UTF-8"?>
    <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
     xmlns:xi="http://www.w3.org/2001/XInclude"
     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-facesconfig_1_2.xsd">
     <managed-bean>
      <managed-bean-name>person</managed-bean-name>
      <managed-bean-class>demo.Person</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
      <managed-property>
       <property-name>name</property-name>
       <value/>
      </managed-property>
     </managed-bean>
     <navigation-rule>
      <from-view-id>/pages/inputname.xhtml</from-view-id>
      <navigation-case>
       <from-outcome>greeting</from-outcome>
       <to-view-id>/pages/greeting.xhtml</to-view-id>
      </navigation-case>
     </navigation-rule>
     <application>
      <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
      <locale-config/>
     </application>
     <factory/>
     <lifecycle/>
    </faces-config>

    inputname.xhtml :
    Code xml : 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
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:c="http://java.sun.com/jstl/core">
     
               <f:loadBundle basename="resources" var="msg" />
     
               <ui:composition template="/templates/common.xhtml">
     
                <ui:define name="pageTitle">Input User Name</ui:define>
     
                <ui:define name="pageHeader">Facelets Hello Application</ui:define>
     
                <ui:define name="body">
                    <h:message showSummary="true" showDetail="false" style="color: red; font-weight: bold;" for="name" />
                    <form jsfc="h:form" id="helloForm">
                        ${msg.prompt}
                        <input label="Name" jsfc="h:inputText" required="true" id="name" value="#{person.name}" />
                        <input  type="submit" jsfc="h:commandButton" id="submit"
                            action="greeting" value="Say Hello" />
                    </form>
     
                </ui:define>
            </ui:composition>
    </html>

    Merci d'avance pour votre aide

  2. #2
    Membre très actif
    Profil pro
    Inscrit en
    Octobre 2008
    Messages
    205
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2008
    Messages : 205
    Par défaut
    Salut,

    Désolé pour la fausse joie, je n'ai pas la réponse , mais j'ai la même erreur...

    La même deuxième erreur : "Missing Built-in Tag Libraries...."

    D'après le nom de l'erreur, c'est un oubli de TAG librairies lié à JSF/Facelets...

    Pour mon cas cette erreur est apparue quand j'ai migré une web application tournant sur jbpm-jpdl-suite-3.2.3.

    Donc en migrant, une appli web BPM (jBPM) d'un serveur embedded JBoss 4.2.2.GA + jBPM 3.2.3... (config qui faisait tourner l'appli web normalemet)

    au serveur JBoss 5.0.0.GA avec jBPM 3.2.6.SP1!

    C'est là qu'est apparu l'erreur, merci pour vos éléments de réponses,
    Cordialement!

  3. #3
    Membre très actif
    Profil pro
    Inscrit en
    Octobre 2008
    Messages
    205
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2008
    Messages : 205
    Par défaut
    Salut, de mon coté j'ai résolu le problème....

    En remplacant jsf-facelet.jar, de ma web app .war dans WEB-INF/lib

    par le jsf-facelet.jar de la distribution correspondant à JBossSeam2.1.1.

    Le jsf-facelet que j'utilisais precedemment étant celui de la suite jpdl-jbpm3.2.3 qui tournait sur JBoss 4.2.2.

    Donc le problème surgit lorsque une mauvaise version de jsf-facelet.jar est utilisé dans la Web-app que l'on veut deployer...

  4. #4
    Membre confirmé
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    176
    Détails du profil
    Informations personnelles :
    Localisation : Algérie

    Informations forums :
    Inscription : Mars 2007
    Messages : 176
    Par défaut
    Bonsoir

    Peut etre que cet article portera une réponse à votre Problème:
    http://blog.javarnd.com/?p=31

Discussions similaires

  1. Problème avec facelet
    Par rc.dev2009 dans le forum JSF
    Réponses: 2
    Dernier message: 03/08/2011, 17h57
  2. [Débutant]problème de facelets
    Par amnass dans le forum JSF
    Réponses: 4
    Dernier message: 31/07/2009, 19h51
  3. Réponses: 8
    Dernier message: 10/04/2009, 14h46
  4. Problème avec Facelets
    Par tealcoune dans le forum JSF
    Réponses: 8
    Dernier message: 13/01/2009, 09h31
  5. Problèmes TinyMCE + Facelets + Firefox
    Par anicaise dans le forum JSF
    Réponses: 3
    Dernier message: 12/12/2007, 13h10

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