Visualizzazione dei risultati da 1 a 4 su 4
  1. #1
    Utente di HTML.it L'avatar di Armun
    Registrato dal
    Jan 2012
    Messaggi
    55

    [HTML] Problemi con utilizzo di jsf e tomcat

    Ragazzi ho un problema. Sto iniziando da poco ad utilizzare jsf su pagine jsp e html pero quando le lancio su tomcati mi da errore

    java.lang.RuntimeException: FacesContext not found

    Se levo la parte dei tag jsf invece funziona bene. Ho importato tutte le librerie possibili ma il problema rimane. Ho pure visto bene il file web.xml e il faces-config.

    Voi avete suggerimenti?

    Oltre che con tomcat ho lo stesso problema anche con oc4j e j boss.
    Vi ho elencato tutti i problemi che ho riscontrato. ho scaricato anche j boss seam ma nn va nemmeno cosi.
    Non so se ho postato nella sezione giusta ma se potete aiutarmi visto che sto lavorando su un progetto nuovo , ve ne sarei molto grato.

  2. #2
    Utente di HTML.it
    Registrato dal
    Dec 2010
    Messaggi
    3,660
    la sezione è sbagliata, devi chiedere di spostare su java, c'è sicuramente qualche problema di configurazione, ma se non posti web.xml, faces-config.xml e stack trace è impossibile aiutarti se non si possiede una sfera di cristallo

  3. #3
    Utente di HTML.it L'avatar di Armun
    Registrato dal
    Jan 2012
    Messaggi
    55
    web.xml



    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
    <display-name>GesCredit</display-name>
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
    <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>/faces/*</url-pattern>
    </servlet-mapping>
    <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContex t</param-name>
    <param-value>resources.application</param-value>
    </context-param>
    <context-param>
    <description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <context-param>
    <description>
    This parameter tells MyFaces if javascript code should be allowed in
    the rendered HTML output.
    If javascript is allowed, command_link anchors will have javascript code
    that submits the corresponding form.
    If javascript is not allowed, the state saving info and nested parameters
    will be added as url parameters.
    Default is 'true'</description>
    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <description>
    If true, rendered HTML code will be formatted, so that it is 'human-readable'
    i.e. additional line separators and whitespace will be written, that do not
    influence the HTML code.
    Default is 'true'</description>
    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <description>
    If true, a javascript function will be rendered that is able to restore the
    former vertical scroll on every request. Convenient feature if you have pages
    with long lists and you do not want the browser page to always jump to the top
    if you trigger a link or button action that stays on the same page.
    Default is 'false'
    </description>
    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
    <param-value>true</param-value>
    </context-param>
    <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>

    <listener>
    <listener-class>org.apache.myfaces.webapp.StartupServletCont extListener</listener-class>


    </listener>

    </web-app>








    faces-config.xml





    <?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/we...config_1_2.xsd">
    <managed-bean>
    <managed-bean-name>utente</managed-bean-name>
    <managed-bean-class>Utente</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>dettaglioUtente</property-name>
    <property-class>DettaglioUtente</property-class>
    <value/>
    </managed-property>
    <managed-property>
    <property-name>email</property-name>
    <property-class>java.lang.String</property-class>
    <value/>
    </managed-property>
    <managed-property>
    <property-name>password</property-name>
    <property-class>java.lang.String</property-class>
    <value/>
    </managed-property>
    <managed-property>
    <property-name>domandaSicurezza</property-name>
    <property-class>java.lang.String</property-class>
    <value/>
    </managed-property>
    <managed-property>
    <property-name>rispostaSicurezza</property-name>
    <property-class>java.lang.String</property-class>
    <value/>
    </managed-property>
    <managed-property>
    <property-name>spesas</property-name>
    <property-class>java.util.Set</property-class>
    <value/>
    </managed-property>
    <managed-property>
    <property-name>username</property-name>
    <property-class>java.lang.String</property-class>
    <value/>
    </managed-property>
    </managed-bean>
    <managed-bean>
    <managed-bean-name>spesa</managed-bean-name>
    <managed-bean-class>Spesa</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>id</property-name>
    <property-class>SpesaId</property-class>
    <value/>
    </managed-property>
    <managed-property>
    <property-name>utente</property-name>
    <property-class>Utente</property-class>
    <value/>
    </managed-property>
    </managed-bean>
    <managed-bean>
    <managed-bean-name>dettaglioUtente</managed-bean-name>
    <managed-bean-class>DettaglioUtente</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>citta</property-name>
    <property-class>java.lang.String</property-class>
    <value/>
    </managed-property>
    <managed-property>
    <property-name>cognome</property-name>
    <property-class>java.lang.String</property-class>
    <value/>
    </managed-property>
    <managed-property>
    <property-name>eta</property-name>
    <property-class>int</property-class>
    <value/>
    </managed-property>
    <managed-property>
    <property-name>indirizzo</property-name>
    <property-class>java.lang.String</property-class>
    <value/>
    </managed-property>
    <managed-property>
    <property-name>nome</property-name>
    <property-class>java.lang.String</property-class>
    <value/>
    </managed-property>
    <managed-property>
    <property-name>numeroPersone</property-name>
    <property-class>int</property-class>
    <value/>
    </managed-property>
    <managed-property>
    <property-name>username</property-name>
    <property-class>java.lang.String</property-class>
    <value/>
    </managed-property>
    <managed-property>
    <property-name>utente</property-name>
    <property-class>Utente</property-class>
    <value/>
    </managed-property>
    </managed-bean>
    </faces-config>











    Cmq ora sposto tutto su java. Grazie cmq

  4. #4
    Amministratore L'avatar di Vincent.Zeno
    Registrato dal
    May 2003
    residenza
    Emilia-Romagna (tortellini und cappelletti land!)
    Messaggi
    20,783
    @Armun
    ricorda che il crossposting non è consentito,
    inoltre DEVI usare il tag CODE per postare codice, grazie

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.