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 :

Initialisation de la servlet Faces


Sujet :

JSF Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé
    Inscrit en
    Avril 2002
    Messages
    224
    Détails du profil
    Informations forums :
    Inscription : Avril 2002
    Messages : 224
    Par défaut Initialisation de la servlet Faces
    Impossible de démarrer mon projet sur tomcat, j'utilise tomcat6 et jsf 1.2, voici l'erreur et mon fichier web.xml ainsi que les JAR déployés dans le projet (il m'en manque peut-être un ?):
    commons-beanutils.jar ; commons-collections.jar ; commons-digester.jar ; commons-logging.jar ; jsf-api.jar ; jsf-impl.jar ; jstl.jar ; standard.jar

    Etat HTTP 500 -

    --------------------------------------------------------------------------------

    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: javax.servlet.ServletException: "Servlet.init()" pour la servlet Faces Servlet a généré une exception
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:565)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:414)
    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:820)


    cause mère

    javax.servlet.ServletException: "Servlet.init()" pour la servlet Faces Servlet a généré une exception
    org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:699)
    org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
    org.apache.jsp.index_jsp._jspService(index_jsp.java:96)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:390)
    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:820)


    cause mère

    java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
    javax.faces.FactoryFinder.getFactory(FactoryFinder.java:263)
    javax.faces.webapp.FacesServlet.init(FacesServlet.java:142)
    org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:699)
    org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
    org.apache.jsp.index_jsp._jspService(index_jsp.java:96)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:390)
    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:820)


    note La trace complète de la cause mère de cette erreur est disponible dans les fichiers journaux de Apache Tomcat/6.0.2.
    Web.xml :
    <?xml version='1.0' encoding='UTF-8'?>

    <!--
    The contents of this file are subject to the terms
    of the Common Development and Distribution License
    (the License). You may not use this file except in
    compliance with the License.

    You can obtain a copy of the License at
    https://javaserverfaces.dev.java.net/CDDL.html or
    legal/CDDLv1.0.txt.
    See the License for the specific language governing
    permission and limitations under the License.

    When distributing Covered Code, include this CDDL
    Header Notice in each file and include the License file
    at legal/CDDLv1.0.txt.
    If applicable, add the following below the CDDL Header,
    with the fields enclosed by brackets [] replaced by
    your own identifying information:
    "Portions Copyrighted [year] [name of copyright owner]"

    [Name of File] [ver.__] [Date]

    Copyright 2005 Sun Microsystems Inc. All Rights Reserved
    -->

    <web-app version="2.5"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlnssi="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">

    <display-name>Car Store</display-name>
    <description>Buy a car.</description>

    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>

    <context-param>
    <description>
    Set this flag to true if you want the JavaServer Faces
    Reference Implementation to validate the XML in your
    faces-config.xml resources against the DTD. Default
    value is false.
    </description>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    </context-param>

    <!--
    PENDING: set to false because demo-components.jar has
    components that can only be created in the context of
    a current request.
    -->
    <context-param>
    <description>
    Set this flag to true if you want the JavaServer Faces
    Reference Implementation to verify that all of the application
    objects you have configured (components, converters,
    renderers, and validators) can be successfully created.
    Default value is false.
    </description>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>false</param-value>
    </context-param>

    <!-- Faces Servlet -->
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>


    <!-- Faces Servlet Mapping -->
    <!--

    This mapping identifies a jsp page as having JSF content. If a
    request comes to the server for foo.faces, the container will
    send the request to the FacesServlet, which will expect a
    corresponding foo.jsp page to exist containing the content.

    -->
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>

    <security-constraint>
    <!-- This security constraint illustrates how JSP pages
    with JavaServer Faces components can be protected from
    being accessed without going through the Faces Servlet.
    The security constraint ensures that the Faces Servlet will
    be used or the pages will not be processed. -->
    <display-name>Restrict access to JSP pages</display-name>
    <web-resource-collection>
    <web-resource-name>
    Restrict access to JSP pages
    </web-resource-name>
    <url-pattern>/bottomMatter.jsp</url-pattern>
    <url-pattern>/carDetail.jsp</url-pattern>
    <url-pattern>/chooseLocale.jsp</url-pattern>
    <url-pattern>/confirmChoices.jsp</url-pattern>
    <url-pattern>/customerInfo.jsp</url-pattern>
    <url-pattern>/finish.jsp</url-pattern>
    <url-pattern>/optionsPanel.jsp</url-pattern>
    <url-pattern>/storeFront.jsp</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <description>
    With no roles defined, no access granted
    </description>
    </auth-constraint>
    </security-constraint>

    <!-- Enable encryption for client side state saving -->
    <env-entry>
    <env-entry-name>com.sun.faces.ClientStateSavingPassword</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>password</env-entry-value>
    </env-entry>

    </web-app>

  2. #2
    Membre éclairé
    Inscrit en
    Avril 2002
    Messages
    224
    Détails du profil
    Informations forums :
    Inscription : Avril 2002
    Messages : 224
    Par défaut
    Personne n'utilise jsf 1.2 ??? Si oui avec quel serveur et si possible un apercu des fichiers de config.

    Merci, bonne journée

  3. #3
    Membre éprouvé
    Inscrit en
    Juin 2006
    Messages
    94
    Détails du profil
    Informations forums :
    Inscription : Juin 2006
    Messages : 94
    Par défaut
    Moi j'utilise Jsf 1.2 avec Facelets 1.1.2 sur GlassFish V1

    Pour les fichiers de config, il suffit de reprendre ceux qui sont fournit dans les packages de téléchargement de jsf ou de facelets

  4. #4
    Invité de passage
    Profil pro
    Inscrit en
    Avril 2005
    Messages
    1
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2005
    Messages : 1
    Par défaut j'ai la même erreur
    j'ai la même erreur pour Java server Faces
    si quelqu'un a une idée pour résoudre cette erreur
    Didier

  5. #5
    Membre éprouvé
    Inscrit en
    Juin 2006
    Messages
    94
    Détails du profil
    Informations forums :
    Inscription : Juin 2006
    Messages : 94
    Par défaut
    Voici une config de base pour jsf 1.2 :

    http://www.jsftutorials.net/download...2KickStart.zip


    pour facelets le mieux c'est de reprendre celle de Facelets même:

    https://facelets.dev.java.net/servle...635&folderID=0
    dans le répertoire demo tu en as plein ....

Discussions similaires

  1. [Initialisation Servlet] Debutant
    Par tatemilio2 dans le forum Servlets/JSP
    Réponses: 2
    Dernier message: 13/09/2006, 15h57
  2. Réponses: 3
    Dernier message: 20/02/2006, 16h28
  3. [Servlet] Recuperer la factory initialisée
    Par mauvais_karma dans le forum Spring Web
    Réponses: 9
    Dernier message: 30/05/2005, 17h22
  4. [Servlet] Fichiers d'initialisation
    Par david71 dans le forum Servlets/JSP
    Réponses: 7
    Dernier message: 03/09/2003, 13h47
  5. [servlet] initialisation d'objets
    Par tiPouick dans le forum Servlets/JSP
    Réponses: 11
    Dernier message: 05/08/2003, 12h12

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