CSS Files Don't Refresh with Wicket (Launched in Intellij via Start.java)

Posted by Scanningcrew on Stack Overflow See other posts from Stack Overflow or by Scanningcrew
Published on 2009-06-30T20:27:53Z Indexed on 2010/03/16 9:36 UTC
Read the original article Hit count: 544

Filed under:
|
|
|

I have create a skeleton Wicket project using

mvn archetype:create -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.4-rc4 -DgroupId=com.mycompany -DartifactId=myproject

All the configuration/importing new project with Maven/Intellij worked fine. I proceeded to add a basic CSS file to my start page, per the following recommended way of doing it in Wicket 1.4

public class BasePage extends WebPage {
    public BasePage() {
        add(CSSPackageResource.getHeaderContribution(BasePage.class, "main.css"));
    }
}

The main.css file has been put along side BasePage.java and BasePage.html in /src/main/java. I launch the application with Start.java. The problem is when I make changes to the CSS file it is not being picked up when I relaunch Start.java. (Changes to the java and html files are being updated when I change them)

I made sure the browser cache was being cleared, and even valided the request/response in Firfox/Firebug. It seems like somewhere between Wicket's magic and the jetty instance Start.java creates the CSS file is being cached and not updated. Any ideas?

© Stack Overflow or respective owner

Related posts about wicket

Related posts about css