I have external content that I need to import in to my Facelets/myFaces application. I�ve tried using c:import since I�m pulling content from outside of my container. However, Facelets does not support c:import . I also configured my application to support JSP pages. My jsp page works fine with the c:import, but I now can�t figure out how to include the jsp page into my facelet page. Any ideas?
I have and it works only if the content is well formed xhtml. I have to be less strict and import html.
Joined: Jul 04, 2003
It is interesting but c:import works in my JSF pages. Ofcourse I need to import JSTL tag library. Otherwise JSF page will not be able to understand c:import.
I can also use JSP includes to include content into my JSF pages. <jsp:include page=""/>. Have you tried that?
make sure you put your included content into <f:subview> as shown in the examle/message above.
you can also use jsp directive(<%@include %>) to include your content into JSF pages.
Joined: Jul 22, 2004
I have also successfully used c:import with jsf. My problem occurs with facelet pages. I have faclets pages that need to import content from outside of my container. When I look at the doc, facelets only supports 4 c: tags and import is not one of them. https://facelets.dev.java.net/nonav/docs/dev/docbook.html
jsp:include and directive include won�t work in a facelets page. In addtion, they will not pull pages from outside of my container.
I think I�ve finally arrived at a solution. I'm going to have to write a custom tag that mimics what c:import does. I still think I may be missing something. It is very surprising to me that faclets does not support c:import.
Joined: Jul 04, 2003
thank you very much for your kind explanation. I really thought that Facelets are same Java Server Faces and there is no difference. And Facelets it is just the way Java Server Faces are called. Just like Midlets, Servlets and Portlets pages written using Java Server Faces are called Facelets.
I am actually very new to JSF and it is my third week working on a project that requires me to write some JSF. I will definetly aquaint myself with http://facelets.dev.java.net/ and with Facelets tonight when I get couple of free hours after putting my kids to sleep .