# How to configuration rails upload directory in tomcat?

**URL:** <https://www.ruby-forum.com/t/how-to-configuration-rails-upload-directory-in-tomcat/197679>\
**Category:** Deployment\
**Created:** [October 18, 2010, 7:18pm UTC](https://www.ruby-forum.com/t/how-to-configuration-rails-upload-directory-in-tomcat/197679 "2010-10-18T19:18:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![okkezSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/85f322/32.png) [@okkezSS](https://www.ruby-forum.com/u/okkezSS)\
**Post date:** [October 18, 2010, 7:18pm UTC](https://www.ruby-forum.com/t/how-to-configuration-rails-upload-directory-in-tomcat/197679/1 "2010-10-18T19:18:49Z")

</div>

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. All the files under public went to the parent directory of  
WEB-INF. 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. I tried to create link in windows. But it still not works.  
Can anybody suggestion some work around to do this? Thanks.
