8 Replies Latest reply on Mar 12, 2008 11:52 AM by deanhiller2000

    seam with facelets(icefaces)

    deanhiller2000

      I know how to precompile jsp's, but the seam example came with facelets which seems to be pretty interesting though the project doesn't seem that active.  Can facelets be precompiled like jsp's can be?  I mean, it would be great if our automated builds caught our syntax errors instead of finding out at runtime.  (probably not the best place to post this question but I actually search a while for an active forum and didn't really find one that was too active).
      thanks,
      dean

        • 1. Re: seam with facelets(icefaces)
          jguglielmin

          Facelets doesn't support precompilation.  As for catching sytnax errors, you should be able to catch most of these with your IDE.  THere are several IDE plug-ins available for ICEfaces at ICEfaces download

          • 2. Re: seam with facelets(icefaces)
            deanhiller2000

            how does tomcat then compile the xthml files?  I would assume it still have to generate the java code and then compile that to servlet class files.  I would think there would be a way to do this at build time so when I deploy, users are not experiencing the slowness of first time pages(especially our in-house tester who will get really fed up with the speed of testing).
            thanks,
            dean

            • 3. Re: seam with facelets(icefaces)
              jguglielmin

              Sounds like something you might like to take up with the facelets people, but this is a posting from the facelets forum

              • 4. Re: seam with facelets(icefaces)
                chadws

                This may be a completely incorrect statement, but it is my understanding that JSF does not precompile, but rather uses JSPs to create a component tree that is rendered either by the components themselves or by external renderers.


                Facelets, does not use JSP and consequently there is no java in the xhtml files at all. Rather the xhtml files are used to generate the component tree at runtime.

                • 5. Re: seam with facelets(icefaces)
                  chadws

                  What I meant to say was that from my understanding JSF uses a runtime tree of components to create output. By default this tree is generated using JSP files. JSP files are java files that are precompiled, but the JSF component tree is still created at runtime. Facelets, using only xhtml, does not have any java to precompile, but rather uses a custom view handler to read the xhtml files and create the component tree. Since there is not java in the xhtml files there is nothing to precompile.

                  • 6. Re: seam with facelets(icefaces)
                    deanhiller2000

                    I don't know.  I was using jasper to convert the JSF/jsp files to java files and then using javac to compile those into class files(the servlets that serve up the JSF/jsp pages).  This did seam to have the effect that first page loads in tomcat where much faster, BUT thanks to that other guys post on the faces xhtml not needing precompile as it isn't any faster, I will go run some tests to see. 

                    • 7. Re: seam with facelets(icefaces)
                      pmuir

                      Dean Hiller wrote on Mar 12, 2008 12:50 AM:


                      I don't know.  I was using jasper to convert the JSF/jsp files to java files and then using javac to compile those into class files(the servlets that serve up the JSF/jsp pages).  This did seam to have the effect that first page loads in tomcat where much faster, BUT thanks to that other guys post on the faces xhtml not needing precompile as it isn't any faster, I will go run some tests to see. 


                      The point is not that you don't need to precompile them but that they can't be compiled as they are directly processed from the XML (some caching is used though, and facelets is generally faster than JSP).

                      • 8. Re: seam with facelets(icefaces)
                        deanhiller2000

                        thanks for the caching info. I didn't know that.  I already got the other info from the other posts


                        Now only if there were some xsd where I could have ant just check for missing arguments to catch at build time instead of runtime.