Skip to main content

Glassfish appears to be using old version of css file

6 replies [Last post]
mlbrooks
Offline
Joined: 2008-08-03
Points: 0

I am running NetBeans 6.9M1, Maven 2.2. I used h:outputStylesheet to put a css file in the head of my facelets template. After cleaning and building in Netbeans, I go to the Glassfish admin console and undeploy/deploy my newly created war file and launch it. It appears to be using an older version of my css.file. When I did a view page source , it showed a MyProj\javax.faces.resource\styles.css.jsf ln=css. When I double click on it is shows me the older version of the css file. If I look at the war file in my Netbean project target directory, or the war file in the Glassfish domain1 deployment directory, it shows the newer css file. Can someone tell me where it is getting the older version of the css file. I can not find it anywhere.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tjahnsen
Offline
Joined: 2010-06-11
Points: 0

I'm suffering the same problem. It's definitely a bug in the resource handler, because even when I've updated the file, and it's the new file in the deploy directory, the response headers have an old "Last-Modified" header.

It got the correct on shift-reload, but the modified date is still wrong. If it cannot figure out the timestamp from the OS, it's pretty hopeless to use the resource tags.

I'm using NetBeans 6.8 and GlassFish 3, and it's the same problems on both JavaScript and CSS, and I attribute it to the cache response headers of the resource injection servlet (/javax.faces.resource/).

angelcervera
Offline
Joined: 2003-12-03
Points: 0

Is this BUG registered in Issue Tracker?

aibrahimsalem
Offline
Joined: 2013-05-28
Points: 0

i have the same problem , but when i cleaned the glassfish server the problem has gone but i found that it randomly happens , try cleaning the glassfish server not the project.

angelcervera
Offline
Joined: 2003-12-03
Points: 0
shanmu123
Offline
Joined: 2010-05-10
Points: 0

Hi, i too have the same problem, the old css file is still being used. Did you find any solution for it. Please let me know.

digitalseraphim
Offline
Joined: 2008-04-30
Points: 0

It's most likely your browser cache. Try clearing your cache, or shift-reload the page.
-ds