Hi, I am migrating from wicket 1.4.21 to wicket 6.6.0. In a javascript template, I need to get the path of an image.
In wicket 1.4.21, I used to do : values.put("datePickerImageUrl", String.format("%simages/icn-calendar.png", RequestCycle.get().getRequest().getRelativePathPrefixToContextRoot())); In wicket 6.6.6, I use: values.put("datePickerImageUrl",String.format("%simages/icn-calendar.png", RequestCycle.get().getRequest() .getPrefixToContextPath())); My page is mount like so: mountPage("dwelling/#{lang}", DwellingPage.class); My page and my image path works great except when I access the page with the optional parameter. I that case, getPrefixToContextPath does not return the correct prefix. I should get ../images/icn-calendar.png. because the url is "/dwelling/en" but instead I get "images/icn-calendar.png" Is this a bug ? Is there an other method I could use ? Thanks David -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/getPrefixToContextPath-and-optional-named-parameters-tp4657934.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org