我在项目中使用primefaces 6.0和Spark-layout。 它非常适用于localhost。 但是当我将它上传到服务器(jboss或tomcat没有区别)时,有时页面无法加载。 它是随机发生的。页面在加载时卡住了。
当我查看服务器日志时:
记录此行等待太多: “GET /XXX/javax.faces.resource/images/preloader.gif.xhtml?ln=spark-layout HTTP / 1.1”200 17824
我也在日志中看到过这个:
“警告[http-nio-80-exec-27] com.sun.faces.application.resource.ResourceHandlerImpl.logMissingResource JSF1064:无法从库中查找或提供资源components.js ,primefaces。“
我继续调查,并且发现问题发生时,页面等待从primefaces库加载.js文件。 页面卡在头部的这一行:
script type =“text / javascript”src =“/ XXX / javax.faces.resource / jquery / jquery.js.xhtml?ln = primefaces& v = 6.0”>
无法加载其他.js文件:
script type =“text / javascript” SRC = “/ XXX / javax.faces.resource / jquery的/ jquery的-plugins.js.xhtml LN = primefaces&安培; V = 6.0” >
script type =“text / javascript” SRC = “/ XXX / javax.faces.resource / core.js.xhtml LN = primefaces&安培; V = 6.0” >
因此,我该怎么做才能摆脱这个问题:) 感谢...