Everytime I tweak JForum and then redeploy to Tomcat I lose my avatars. This is because they are stored in the webapps directory, which gets cleared out when I redeploy. How can I tell JForum to store local files in a directory other than the webapps directory? [originally posted on jforum.net by berniedurfee]
The problem here is that storing the avatars outside the webapps will make the file unavailable for the web.
With some code change, it is possible to bypass this limitation. I did it once on a customization JForum for a company, where we'd set two attributes - one containing the "write" directory, which could be any directory anywhere, and the other attribute was the "virtual" one, used for the web.
Finally, we mapped the virtual dir into Apache's HTTPD.
It is possible to use that on JForum as well, but would require some changes here and there.
If you know Java and 4 or 6 hours to help us, I can guide / help you on that.
Rafael [originally posted on jforum.net by Rafael Steil]
It should be possible without that workaround. We use Confluence and JIRA, both of which write to and read from an external directory. It looks like they use a download servlet to pipe the files from the external directory to the browser.
That seems like it would be a good solution, as the download servlet could be pluggable and have special implementations, like storing files in the database instead of disk.