10 Replies Latest reply on Jul 16, 2009 4:34 AM by ilya_shaikovsky

    richfaces tab and jsp:include problem

      Hi,
      I am trying to use rich faces tabs, I have four tabs on a page and each tab includes a jsp.
      The content of jsp included in a tab are cluttered up, is there any fix to it?

       <rich:tabPanel switchType="client" >
       <rich:tab label="Coverage">
       <f:subview id="sv1">
       <jsp:include file="coverage.jsp"/>
       </f:subview>
       </rich:tab>
       <rich:tab label="Comment">
       <f:subview id="sv2">
       <jsp:include file="comment.jsp"/>
       </f:subview>
       </rich:tab>
       .................
       </rich:tabPanel>
      


      Thanks.

        • 1. Re: richfaces tab and jsp:include problem
          kukeltje

           

          "ysufyan" wrote:
          Hi,
          I am trying to use rich faces tabs, I have four tabs on a page and each tab includes a jsp.
          The content of jsp included in a tab are cluttered up, is there any fix to it?

           <rich:tabPanel switchType="client" >
           <rich:tab label="Coverage">
           <f:subview id="sv1">
           <jsp:include file="coverage.jsp"/>
           </f:subview>
           </rich:tab>
           <rich:tab label="Comment">
           <f:subview id="sv2">
           <jsp:include file="comment.jsp"/>
           </f:subview>
           </rich:tab>
           .................
           </rich:tabPanel>
          


          Thanks.


          Yes there is.... don't use jsp's

          A more serious answer would be: define 'cluttered up'. Screenshots *with* descriptrions of things that go wrong, example jsp etc... We all can't guess

          • 2. Re: richfaces tab and jsp:include problem

            Thanks a lot for quick reply. By 'cluttered up' I meant the included page is not displayed the way it should be displayed, the formatting is out of order. I read an article indicating jsf and jsp do not go well together as they share same output stream. I am sure same is the case here.

            You mentioned avoid using JSP, could you please mention how I will include page in a tab if I am not using JSP's. And if possible what are the alternates for jsp.

            Thanks again.

            • 3. Re: richfaces tab and jsp:include problem
              kukeltje

               

              "ysufyan" wrote:
              Thanks a lot for quick reply. By 'cluttered up' I meant the included page is not displayed the way it should be displayed, the formatting is out of order.

              :-) I knew that part... I was more wondering what the details were. What you had in the jsp, how it rendered wrong etc.

              I read an article indicating jsf and jsp do not go well together as they share same output stream. I am sure same is the case here.

              Yes, that is why I mentioned don't use jsp. They are parsed at different phases.


              You mentioned avoid using JSP, could you please mention how I will include page in a tab if I am not using JSP's. And if possible what are the alternates for jsp.

              If you found jsp and jsf do not realy match, you will probably have encountered on of the key articles on this: http://www.ibm.com/developerworks/java/library/j-facelets/


              Thanks again.



              • 4. Re: richfaces tab and jsp:include problem

                 


                If you found jsp and jsf do not realy match, you will probably have encountered on of the key articles on this: http://www.ibm.com/developerworks/java/library/j-facelets/

                I just read the article you mentioned while It made me excited that I can use facelets to fix my issue, but in the end it says facelets does not work with IBM JSF RI :( and I am using IBM products for development, I tried to make application server to load JSF jar I am providing and not IBM's but it does not work. Did any one encountered same issue and got a working solution?

                Thanks.


                • 5. Re: richfaces tab and jsp:include problem
                  kukeltje

                  It's a 3 year old article!!! Things probably have changed since then. I posted this just because it tells the story about facelets.

                  Everybody else that encountered the same problem either did two things:
                  - Kept messing with the jsp until they had something that was not maintainable but worked kind of
                  - Switched to facelets

                  I cannot imagine that the current IBM JSF RI (do they even have one still?) cannot woirk with facelets.

                  • 6. Re: richfaces tab and jsp:include problem
                    kukeltje

                    that should of course have been 'either one of two things'

                    • 7. Re: richfaces tab and jsp:include problem
                      ilya_shaikovsky

                      try a4j:include.

                      • 8. Re: richfaces tab and jsp:include problem
                        kukeltje

                        Does that work? Hmm... now and then you learn something new....

                        • 9. Re: richfaces tab and jsp:include problem

                          I found a way to use SUN's JSF RI instead of IBM's JSF RI in Wepsphere6.1, as faceletes does not work with IBM JSF. Not using JSP's any more everything is working fine!!!

                          Thanks a lot kukeltje and ilya_shaikovsky.

                          • 10. Re: richfaces tab and jsp:include problem
                            ilya_shaikovsky

                            yup.. and in general RF not supports IBM RI. We never checked for compatibility with this RI.