0

I have the following line inside a section of a panel:

.divider{
   background-image: url("img/pspacer.png");
}

With the .png placed relative to the panel java/html sources

Wicket Autolink is enabled and works for other resources, such as .js and .css files. the Url inside the CSS declaration is unmodified by Wicket and of course results in an error when requested form the browser.

java.lang.ClassNotFoundException: img

the error changes to a 404 Error if there is no collision with static resources. Yet the original problem remains, that the autolinker does not alter the reference.

Andreas Petersson
  • 16,248
  • 11
  • 59
  • 91
  • 1
    How is it that the browser error (from your description, I'd expect a 404) is a ClassNotFoundException? Does the img-path maybe collide with a mount-path from the wicket application? – Nicktar Feb 19 '13 at 12:25
  • I'm not familiar with Wicket but I could take a guess that it can't find the img element because it's a background image? I may be well off the mark but it's a thought. – Billy Moat Feb 19 '13 at 12:26
  • Nicktar, you are correct. i had a folder img in /webapp/ - if i rename it i get a 404 Error. – Andreas Petersson Feb 19 '13 at 12:47
  • 1
    According to JavaDocs, [AutoLink](http://ci.apache.org/projects/wicket/apidocs/1.5.x/org/apache/wicket/markup/resolver/AutoLinkResolver.html) in only intended to work for links (i.a. href-tags). – Nicktar Feb 20 '13 at 12:18

0 Answers0