• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How do I set the location of avatar files?

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

[originally posted on jforum.net by berniedurfee]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm.. well, if that is OK to you..

I don't like the download server because you have to point all images to it, and I tend to believe that it will require more system resources to deliver the images than using the web server.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic