面对同样的挑战,我最终扩展
javax.faces.application.ResourceHandlerWrapper andjavax.faces.application.ResourceWrapper了将“&v =xyz”附加到的结果中
ResourceWrapper#getRequestString()。
我看到了Primefaces和Openfaces实现的这种解决方案。只是看看
org.primefaces.application.PrimeResourceHandler#createResource(String resourceName, String libraryName)
和
org.primefaces.application.PrimeResource#getRequestPath()
在这里可用。
不要忘记将实现添加到faces-config.xml:
<application> <resource-handler>your.package.YourResourceHandlerWrapper</resource-handler></application>



