You can see how this works for you:

String path =  WebApplication.get().getServletContext().getRealPath("");
Folder uploadFolder = new Folder(path+"/uploads");

public String getURLFolder(){
        return
getServletContext().getContextPath()+uploadFolder.getPath().replace(path,
"");
}


I remember writing this a long time ago, looking at it now, not sure why or
what the difference is "getRealPath("")" and "getContextPath()", and not
sure if Wicket 1.5 changed this code, but this worked for me, though I hope
to migrate to a database that way there should be much much less issue in
regard to scaling to 20 servers... where sharing a database and backing up
is readily done and improved whereas sharing files probably not....

Matthew
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Storing-and-retrieving-user-uploaded-images-tp3312735p3313112.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

Reply via email to