Thanks everyone, I was able to fix it by doing: When uploading a picture: WebApplication.get().getServletContext().getRealPath() + / + profilePics + /; When retrieving a picture: WebApplication.get().getServletContext().getContextPath() + / + profilePics + / + userId + /;
Hi, I'm having trouble storing user uploaded images. In my WicketApplication class, I setup a folder to store users pictures, so I end up with a folder structure similar to this: ROOT FOLDER - user1_folder (pic1.jpg, pic2.jpg, etc...) - user2_folder ( ... ) - ... The issue I am having is that
don't use . (current folder) in web apps better user servletcontext.getAttribute(javax.servlet.context.tempdir) and use that as root folder if you need the uploads to be persistent (to be there after server restart) then create your own folder (e.g. /apps/myapp/image-uploads) On Fri, Feb 18,
On Fri, Feb 18, 2011 at 9:21 AM, Martin Grigorov mgrigo...@apache.org wrote: if you need the uploads to be persistent (to be there after server restart) then create your own folder (e.g. /apps/myapp/image-uploads) Or a database.
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