What you're saying is that a client requests the url http://localhost:8080/app1 and the img src attribute has app2/image?item-123 but you want it to be http://localhost:8080/app2/image?item-123 instead?

Why does it make a difference? The relative url will be resolved to http://localhost:8080/app2/image?item-123 so it's actually the very same path. Check out the net tab in Firebug and you'll see it.

When and if the image url changes to another Tomcat instance, Wicket will render it in full as required. Just change the UrlResourceReference to http://localhost:8081/app2 (the http:// is necessary I believe) to see it in action.

On 07/06/2013 7:27 AM, bronius wrote:
Relative is not good because resources are served from different application,
just currently both applications are deployed on same tomcat so they have
urls http://localhost:8080/app1 and http://localhost:8080/app2. When "smart"
wicket renders image src i get something like this:
<app2/image?item=123&amp;id=1>  so it thinks this is url of my main
application (app1), but its not. When i modify with firebug to use full
http://localhost:8080/app2 it works fine. So only solution is to override
UrlRenderer? That would mean I would have to override also RequestCycle?
Just for such simple case? Maybe there is simpler solution?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/UrlResourceReference-for-images-tp4659261p4659271.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



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to