How to access the folders outside Tomcat
Published on September 7, 2010 by
The best way for accessing the folders outside Tomcat webapps folder is mapping folders using mount-points. Assume the application folder located in below path: (MyApplication)
/home/amir/java/tomcat/webapps/MyApplication/
I need to upload files into another machine so I just created a folder “hugeSizeFolder” into the “MyApplication” folder.
Then I mapped it to a remote shared folder.
Assume the remote shared folder located in : “//192.168.137.69/shareStorage”.
Then just follow below steps:
$ mkdir /home/amir/java/tomcat/webapps/MyApplication/hugeSizeFolder $ sudo chmod -R 777 /home/amir/java/tomcat/webapps/MyApplication/hugeSizeFolder $ sudo smbmount //192.168.137.69/shareStorage /home/amir/java/tomcat/webapps/MyApplication/hugeSizeFolder
Done. The local folder will keep synchronize with the remote shared one in OS level automatically. The mapping is transparent to Tomcat.
No Comments