Is CSS style sometimes applied only after refreshing a page on a jsf page?

For a long time I came across a strange error in our application and could not find a solution even in google and stackoverflow I did not find anything that corresponded to my problem.

Firstly, a brief description of the application settings:

  • ICEfaces 1.8.1 and JSF 1.2
  • Seam 2.1.1
  • Java 1.6 Update 20
  • works on JBoss 4.2.2.GA
  • application is deployed as an EAR file

If you need more information, please tell me, I will try to find out and provide it to you.

Now the problem is:

Sometimes (on random pages in the application), the generated JSF HTML code is created and sent to the browser, but no style sheets are included. After refreshing the page (pressing F5) the page is displayed as it should and all styles are applied. On some pages, the error appears to be reproducible, while on others it happens by accident. Error (?) It occurs in Opera (11.51, not earlier versions) and Firefox (the application works fine in version 3.6, but not in Firefox 6). IE9 is working fine.

The site consists of a top-level page (template.xhtml) that forms the layout of the application, all other sites are enabled via ui: include-Tags.

In head-tag styles are enabled through

<link href="#{request.contextPath}/stylesheet/icefaces_style.css" rel="stylesheet" type="text/css" />
<link href="#{request.contextPath}/stylesheet/screen.css"
rel="stylesheet" type="text/css" />

It means:               

Even if the page is displayed correctly, style sheets are not included in the head, they are placed in the body tag, displayed as:

<body>
<link type="text/css" rel="stylesheet" href="/myApp/stylesheet/icefaces_style.css">
<link type="text/css" rel="stylesheet" href="/myApp/stylesheet/screen.css">
</body>

, . , head-tag template.xhtml .

? !

+5
1

JSF , , . , , ICEfaces . CSS , ICEfaces - .

+2