Simple primefaces application not working

前端 未结 3 1387
说谎
说谎 2020-12-11 07:27

I am trying to build simple JSF application using primefaces but somehow primefaces components are not getting rendered properly. I dont understand what is going wrong.

相关标签:
3条回答
  • 2020-12-11 08:17

    Try changing your web.xml servlet mapping:

    <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.xhtml</url-pattern>
     </servlet-mapping>
    

    The way to tell if the Facelets Servlet is processing your xhtml is to look at what the browser receives. If it looks like your xhtml file then you have something mis-configured.

    0 讨论(0)
  • 2020-12-11 08:20

    You should change your namespace into xmlns:p="http://primefaces.org/ui"

    and implement button like this way

     <p:commandButton value="Home" process="@this" action="actionMethod()" immediate="true" rendered="true or renderingMethod()" />
    
    0 讨论(0)
  • 2020-12-11 08:28

    Your need change

    xmlns:p="http://primefaces.prime.com.tr/ui"
    

    to

    xmlns:p="http://primefaces.org/ui"
    
    0 讨论(0)
提交回复
热议问题