Navigation with Facelets template not working

后端 未结 1 599
旧巷少年郎
旧巷少年郎 2021-01-19 01:11

I\'m having some trouble with navigation when using Facelets.

I have my master template in /WEB-INF:


    
1条回答
  •  猫巷女王i
    2021-01-19 02:06

    This means that the request URL (as appears in browser address bar) didn't match the URL pattern of the FacesServlet as definied in web.xml.

    Those links

    RAM
    Motherboard
    Video Card
    

    expects the FacesServlet to be mapped on *.xhtml. But if it's mapped on for example *.jsf and changing it to *.xhtml is not an option for some reason (I however strongly recommend it), then you'd need to fix the links

    RAM
    Motherboard
    Video Card
    

    Or, better, just use . It'll implicitly append the proper context path and FacesServlet mapping:

    
    
    
    

    See also:

    • Communication in JSF 2.0 - Implicit navigation

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