I am trying to access different static images that aren't Wicket resources, though their path is set programmatically by my Wicket pages; unfortunately I'm seeing strange behavior.
My wicket app is installed under "/myContext/wicketStuff" (with wicketFilter url-pattern pointing to 'wicketStuff'), but my images are found at the top level under "/myContext/images", eg. "images/en_US/junk.gif". I'm trying to point to different ones based on Locale (rather than use the nice classpath resources, at least for now), so I'm trying the following: String locale = "en_US"; add(new ContextImage("currentJunk", "images/" + locale + "/junk.gif")); ... or: add(new Image("currentJunk").add(new ContextPathGenerator("images/" + locale + "/junk.gif"))); My HTML is simple: <img wicket:id="currentJunk" /> The output is strange: it puts my path argument at the front of the URL, and then it adds a "/../" at the end: <img src="images/en_US/junk.gif/../" wicket:id="currentJunk"> This seems like a bug; why would it put stuff at the end? Manually configuring the context (eg. in web.xml) seems fraught with danger. I could probably work with it if it would put that at the beginning or even not put anything at all, and I could specify the path. I'm using version 1.4-m3 I appreciate any help or even other suggestions. Thanks! Trent