Richfaces 4 components don't render

后端 未结 2 753
小蘑菇
小蘑菇 2021-01-14 00:03

The problem I have is that jsf tags are not being parsed, so I\'m not seeing richfaces components in my pages. I\'m using richfaces 4, tomcat 7, and jsf 2.0

This is

相关标签:
2条回答
  • 2021-01-14 00:24

    the source code I get from browser is identical

    In other words, the FacesServlet wasn't called and was therefore not able to do its job. That can only mean that the request URL did not match the URL pattern of the FacesServlet as definied in web.xml. Perhaps you opened the page by http://localhost:8080/bisis-please-work/somepage.xhtml instead of by http://localhost:8080/bisis-please-work/somepage.jsf which would match <url-pattern>*.jsf</url-pattern> as you've definied in web.xml.

    Alternatively, you can also replace *.jsf by *.xhtml so that you don't need to fiddle with URLs anymore and also don't need to worry about the client being able to see the raw JSF source code. The only disadvantage is that you won't be able to serve "plain vanilla" XHTML files without invoking the FacesServlet, but that shouldn't matter, those files should have the .html extension anyway.

    0 讨论(0)
  • 2021-01-14 00:31

    I had the same problem, but with a different root cause. For me, richfaces components, in particular the rich:tabPanel, were not rendering because there were plain html tags in the page.

    <head>...</head>
    

    instead of

    <h:head>...</h:head>
    

    caused the rich:tabPanel to not display at all.

    Using plain html body tags caused the tabs to render, but not be clickable.

    0 讨论(0)
提交回复
热议问题