I saw examples containing things like this:
mountSharedResource("/images/logo.gif", new ResourceReference(ImageScope.class, "logo.gif").getSharedResourceKey()); mountSharedResource("/resource", Application.class.getName() + "/" + resourceKey);
But Javadoc says this for the constructor:
ResourceReference(java.lang.Class<?> scope, java.lang.String name);
So, when you create a ResourceReference , you give it a class. What for? Usually you need the global scope or scope of the ResourceReference object you just created, not?
Also, what is name ? Is this a sharedResourceKey ? If not, where does resourceKey come from? How does this happen and why is it not a name? Or name looked through the class path and magically loaded (assuming there is only one file with that name in the class path, what happens if there are several?)? If he uploads a file with that name, why doesn't he talk about it in Javadoc?
How do you assign a physical resource to this ResourceReference ? There is getResource() , but they seem to have missed setResource() . If you have, say, an image file in the webapp directory, how do you βattachβ a link to the file, its path, or even a stream of bytes of the contents of the file? If there was a way to read resources in webapp, this might be useful, but you cannot; it is only on the way to classes.
I would like to "mount" the contents of, say, webapp/games/someGame.swf so that SWF in webapp can access the Wicket pages or just get some kind of handle to them.