On 18/10/2010 18:11, Ray Sun wrote: > My basic requirement is upload and show image. > I use rails on jruby and warble package the project as war on windows. In > rails, I set my upload directory as '#{Rails.root}/public/data/users'. And > it works on common rails light server like webrick. But after I deployed to > tomcat, the 'public' disappear.
It disappears from the filing system, or from the path? > All the files under public went to the parent directory of WEB-INF. That would be the webapp directory. Can you illustrate this with a full path? Can you detail your exact Tomcat, Java & OS versions please? How have you configured the Host in server.xml? > And after the server started, the rails function can't find the path. > Then I tried to move my 'data' directory back to WEB-INF, but the url > doesn't work. Why would you move it to WEB-INF? > I tried to create link in windows. But it still not works. > Can anybody suggestion some work around to do this? Thanks. Uploading files to the webapp directory isn't a good strategy, because the contents may be lost when you reload the application. Specifying a full path is more sensible. You could then map that directory into the application path's URL namespace, by defining a dummy application which serves that path/directory. p
0x62590808.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature