Hi,

i dont see the current problem but why dont you just go an easier way in
using IndexedParamUrlCoding strategy?

e.g:

-> create 1 normal Wicket WebPage having a (PageParameters params) strategy
-> mount that page in the init() using 
        mount(new IndexedParamUrlCodingStrategy("/images"));

then the page is responsible for all calls to /images/*

if you want a complete path (as params.get(int ) only givesback the bits
between the slashes) ,then count the params and put em together in a loop
and thats it...

seems more easy solution to me....

Regards


> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] Im Auftrag 
> von Rüdiger Schulz
> Gesendet: Freitag, 25. Mai 2007 11:15
> An: wicket-user
> Betreff: [Wicket-user] Problem with jsessionid in mounted Resources
> 
> Hello all,
> 
> I have (or had) a problem with mounted Resources and an 
> iserted jsessionid. My goal is, as discussed here before:
> http://www.nabble.com/Bookmarkable-images-tf3706668.html#a1038
3150, to have dynamic image URLs with just slashes and no >
question-mark-separated querystring, like this:
> 
> /images/thumbnail/20.png
> 
> What I did was in short this:
> 
> Subclassed WebResource like this:
> 
> public IResourceStream getResourceStream() {
>       String path = 
> RequestCycle.get().getRequest().getRequestParameters().getPath();
>       // ... parse path, return ResourceStream
>       // path should be "images/thumbnail/20.png"
> }
> 
> In my Application.init():
> 
> getSharedResources().add("imageDataResource", new 
> ImageDataResource()); 
> mountSharedResource(ImageDataResource.MOUNT_PATH, new 
> ResourceReference("imageDataResource").getSharedResourceKey());
> 
> Then a custom WebComponent, where I have an AttributeModifier 
> for the src attribute, where I compile the src like this:
> 
> ResourceReference resRef = new ResourceReference("imageDataResource");
> String src = urlFor(resRef);
> src += "thumbnail/20.png";  // this is dynamic in the application
> 
> This all works almost perfect.
> 
> It stops working when someone has disabled cookies, and 
> jsessionid is added to all URLs. Then they look a little 
> strange like this:
> 
> /images;jsessionid=1ar97uck8ovr5/thumbnail/20.png
> 
> because urlFor(resRef) returns
> 
> /images;jsessionid=1ar97uck8ovr5
> 
> With such a URL, the command getRequestParameters().getPath() 
> returns simply "images", and all additional path info is lost.
> 
> Now, my first take at a solution would be to take the 
> jsessionid into consideration when building my URLs, so that 
> they look like this:
> 
> /images/thumbnail/20.png;jsessionid=1ar97uck8ovr5
> 
> But maybe this is just a workaround for something I did wrong 
> at another place?
> 
> 
> --
> greetings from Berlin,
> 
> Rüdiger Schulz
> 
> www.2rue.de
> 
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by DB2 Express Download DB2 
> Express C - the FREE version of DB2 express and take control 
> of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to