I hope I'm getting your point right ... I think the solution for your problem is to mount the resource. E.g. in your application class (if it's a logo that's reused often in the app ... and also comes with the app)
final String name = "foo.jpg"; getSharedResources().add(name, PackageResource.get(YourClassScope.class, name)); mountSharedResource("/img/" + name, new ResourceReference(name) .getSharedResourceKey()); then you can access it with "/img/foo.jpg" in your html or in your StaticImages and so on ... again, hope I got your point :-) Fabien D. wrote: > > Hi everybody, > > In my web application, I want to display a Image. > > I try to use Image and ResourceReference but I have some problemes > > My image is in a folder "stock" in my context of my web aplication : > > /stock/domaine/sdoimaine/projet/logo. I try to load it with the real path, > or the context path... > > String name_upload = GestionProperties.getProperty("uploadRealdir"); > String chemin = > name_upload+File.separator+model_domaine.getObject()+File.separator+model_sous_domaine.getObject()+File.separator+model_nom.getObject()+File.separator+model_logo.getObject(); > ResourceReference ref = new ResourceReference(chemin); > Image logoProjet = new Image("logoimg", ref ); > > And the result is : > http://localhost:8080/appWicket-1.0/resources/org.apache.wicket.Application/stock........... > > How can I place my RessourceReference in the context? > > Thank you in adance > ----- Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/How-can-i-load-Image---tp17403872p17405297.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]