How do I configure JSF url mappings without file extensions?

后端 未结 2 591
小鲜肉
小鲜肉 2020-12-14 03:56

Most tutorials propose a default JSF configuration similar to the following web.xml:


    javax.faces.DEFAULT_SUFFIX&l         


        
2条回答
  •  感动是毒
    2020-12-14 04:05

    You can use Filter to hide this extension and make your URL SEO friendly. One such implementation of Filter is PrettyFaces.

    For example: If you need http://host:port/yourapp/login to resolve with your login.xhtml then in pretty filter configure following way

    
         /login 
         /legacy/user/login.jsf 
    
    

    Have a look at two min video tutorial

提交回复
热议问题