I am creating a zip file through my app deployed on apache tomcat 7. I want to make that zip available for download to the users. Where shall I place my zip on tomcat server to be available for download or Can I store my zips on some drive and map them through tomcat to be available for download?
Share
There are 2 ways to it.
Option 1: Put your zip or any file under webapps folder e.g. /webapps/test/hello.zip. Putting zip there can be accessed by
http://<host:port>/test/hello.zipOption 2: You can map any directory on your file system accessible via tomcat. To do this you need to configure server.xml at $Tomcat_home/conf/server.xml
Add this new tag under tag.
Now zip can be accessed in same way
http://<host:port>/test/hello.zip