Martin Grigorov-4 wrote: > > Because the resources are supposed to be next to WEB-INF folder. > Wicket should handle the requests to dynamic resources (pages, > callback listeners, etc.), while the static resources better should be > handled by the web container. > > Why do you use 'resources' ? I guess because the resource is in the > classpath. In this case you can use <wicket:link>. >
I agree with the point that resources should be handled by the web container: if I write src="xxx.gif", I expect that the web container will serve the resource. So in that case RelativePathPrefixHandler is good. But that's the important point: I use 'resources' in order to use the Wicket Resource mecanism. Writing src="resources/com...../xxx.gif" makes Wicket answering the request, without any ResourceReference declared in Java (lazy guy !). So, for that specific case I expected that RelativePathPrefixHandler recalculate correctly the path, going up to the wicket filter and not to the context path. As I read your answer, I think that using Wicket resources url in the markup without declaring ResourceReference is a bad practise. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Why-RelativePathPrefixHandler-calculates-path-from-context-path-tp3632353p3634976.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
