Can I use EL for external CSS files with JSF?

前端 未结 6 1107
情歌与酒
情歌与酒 2020-12-19 07:46

In external style sheets of my current JSF project, there are hard-coded links to external resources like

.someId { background-image:url(/context/resources/i         


        
6条回答
  •  别那么骄傲
    2020-12-19 08:30

    @Bozho's answer pretty much covers your options.

    Another possibility is to continue having a static style sheet, and filling in the dynamic parts in the document's head where you have access to your expressions:

    
    
    
    
    
    
    

    in the PHP world, this is the best practice because it saves an expensive PHP process from being created for the style sheet call. I don't know how things are in the JSP world but I assume it's similar.

提交回复
热议问题