Gili,
the following snippet is from your bug entry and I put my answers in between.
>Image sunset2Small = new Image("sunset2Small");
>sunset2Large.add(sunset2Small);
>
>Wicket generates a URL which contains a locale as well
>as a jsessionid. For example:
>"/Main/resources/com.be.desktopbeautifier.web.main.Page/sunset/thumbnails/category_en_US.jpg;jsessionid=68234814AC43F1119B0E5C448A2EF823"
>
>Given the code:
>
>ResourceLink sunset2Large = new
>ResourceLink("sunset2Large", new
>StaticImageResourceReference(getClass(),
>"sunset/Outburst_by_dilekt.jpg"));
>add(sunset2Large);
>
>Wicket generates a broken link to
>"/Main/resources/com.be.desktopbeautifier.web.main.Page/sunset/Outburst_by_dilekt.jpg"
>
>Notice that both a locale and jsessionid is missing
>from this URL.
>
>Expected behavior:
>
>1) neither URL should have a jsessionid since both
>refer to static images and as far as I recall these are
>supposed to be shared application-wide.
>
yes and no. yes in general you don't need a query string based
jsessionid. No, every request is/will be associated to a session with
Wicket. A new one will be created if no jsessionid was found. and
servlet container allow for two means to provide the jsessionid: http
header or query string. Why there are two means is not the question
now. The point is, with or without a url containing a jsessionid it
shouldn't matter. The image should be returned.
>2) ResourceLink should not produce broken links
The way StaticImageResourceReference works it does NOT care about the
locale. It simply uses the class' packagename and the relative path
provided. Though its base class ResourceReference seems to support
locale and style, StaticImageResourceReference definitely does not.
I'd suggest, but may be there are better solutions, to copy or
subclass StaticImageResourceReference and replace newResource() with
an implementation which takes locale into account. Shouldn't be that
difficult for you.
Juergen
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user