Message Boards

Static Resources and Style not loaded correctly

Alex Pasquini, modified 3 Years ago.

Static Resources and Style not loaded correctly

Junior Member Posts: 38 Join Date: 3/3/20 Recent Posts
Dear all,

I'm developing portlet using Primefaces 7 on liferay 7.3 GA1 CE.
When portlets are loaded, at the beginning, all the static resources are shown, even if they should be hidden.
Even the modals which would be triggered from button are shown.
Moreover I can see the portlet content without style.
After few seconds, portlets are shown correctly.
This problem appears on every browser except firefox. From mobile, i'm using Chrome and Safari on iPhone, and portlets are shown correctly.
At the beginning, when I load the page, I see the following screen:

After few seconds, I see the following:

On my portlets, on web.xml, I have the following settings:
<context-param>
&nbsp;&nbsp; &nbsp;<param-name>javax.faces.PROJECT_STAGE</param-name>
&nbsp;&nbsp; &nbsp;<param-value>Production</param-value>
</context-param>
<!-- JSF 2.2 now allows for composite components and resources to be hidden
    under WEB-INF -->
<context-param>
&nbsp;&nbsp; &nbsp;<param-name>javax.faces.WEBAPP_RESOURCES_DIRECTORY</param-name>
&nbsp;&nbsp; &nbsp;<param-value>/WEB-INF/resources</param-value>
</context-param>
<context-param>
&nbsp;&nbsp; &nbsp;<param-name>com.sun.faces.defaultResourceMaxAge</param-name>
&nbsp;&nbsp; &nbsp;<param-value>2592000000</param-value> <!-- 30 days -->
</context-param>

Have you ever experienced this problem?
How did you solve it? Can you please support me?
If you need further information, don't hesitate to ask me.
Thank you in advance.
Best regards,

Alex