5 Replies Latest reply on Mar 17, 2010 12:25 PM by Maxim Areshkau

    Jboss tools 3.1, create a jsf 2.0 project

    Karlheinz Alber Newbie

      Hello,

       

      i install jboss tools 3.1 from this update site http://download.jboss.org/jbosstools/updates/stable/galileo/.

       

      Then i try to create a jsf 2.0 project but under  > Project > JBoos Tools                                         Web > JSF > JSF Project  i can select

      only jsf 1.1 or 1.2.

       

      How can i create a jsf 2.0 project with jboss tools 3.1 ?

       

       

      thx

      kh

        • 1. Re: Jboss tools 3.1, create a jsf 2.0 project
          Maxim Areshkau Apprentice

          There are no wizards in JBoss Tool for creating Jsf 2 projects. You can vote for this https://jira.jboss.org/jira/browse/JBIDE-5219

          I think you can create this project manualy:

          1. create dynamic web project and add jsf libraries;
          2. create maven project with jsf libraries.
          • 2. Re: Jboss tools 3.1, create a jsf 2.0 project
            Krasimir Goutcev Apprentice

            See what i have done:

             

            1.create "Library Set" ->JSF 2.0 ( jsf-api-2.0.2-b10.jar, jsf-impl-2.0.2-b10.jar )

            2.create "Library Set" -> Facelets (jsf-facelets-1.1.15.B1.jar)

            3. create "Custom capabilitis" -> JSF2 with Facelets ( Library sets - JSF 2.0,Facelets)


            4. create JSFProject

            5.Add Custom Capabilities -> Select created on step 3


            6.create a simple test page:

              <!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:h="http://java.sun.com/jsf/html"
                  xmlns:f="http://java.sun.com/jsf/core"
                  xmlns:ui="http://java.sun.com/jsf/facelets">
             

                   <h:body>
                       aaa
                   </h:body>


              </html>

            7. deploy on Tomcat 6

             

             

            So testing ot FF everithing is OK

            but on IE I see this :

            EIPorblem.png

             

            Any help is welcome.

            • 3. Re: Jboss tools 3.1, create a jsf 2.0 project
              Krasimir Goutcev Apprentice

              Next try:

               

              1. create JSF Project 1.2 with template "JSFKickStartWthoutLibs

              2. test -> OK

              3. add  <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>

              4. add facelets.jar in lib

              5 create simple test.xhtm

              6 test -> OK

              7 replace jsf-impl and jsf-api  with jsf-api-2.0.2.jar, jsf-impl-2.0.2.jar

              8 test ->ok

              9 add in test.xhtml <h:body> to test jsf 2.0

              10 test -> error

                       
              com.sun.facelets.tag.TagException: /test.xhtml @7,10 <h:body> Tag Library supports namespace: http://java.sun.com/jsf/html, but no tag was defined for name: body
                  at com.sun.facelets.compiler.CompilationManager.pushTag(CompilationManager.java:193)
                  at com.sun.facelets.compiler.SAXCompiler$CompilationHandler.startElement(SAXCompiler.java:194)
                  at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
                  at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:767)
                  at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
                  at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
                  at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
                  at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
                  at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
                  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
                  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
                  at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
                  at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
                  at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
                  at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
                  at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
                  at com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:232)
                  at com.sun.facelets.compiler.Compiler.compile(Compiler.java:105)
                  at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:218)
                  at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:149)
                  at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:100)
                  at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:517)
                  at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
                  at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)
                  at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
                  at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
                  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
                  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.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
                  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
                  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
                  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
                  at java.lang.Thread.run(Thread.java:619)

               

              11. remove  <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>

              12.test -> no error but xhtm is not interpreted.

               

               

               

              Any ideas?

              • 4. Re: Jboss tools 3.1, create a jsf 2.0 project
                Maxim Areshkau Apprentice

                Hi,

                4. add facelets.jar in lib

                Adding faceltes.jar isn't necessary by my opinion, because it's included into jsf2 libs.

                 


                • 5. Re: Jboss tools 3.1, create a jsf 2.0 project
                  Maxim Areshkau Apprentice
                  Problem that some jsf page not works in IE. In my case it was resolved by updating for newer version of jsf2.0 library.