Where to put a properties file for custom JAR?

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
Post Reply
12140kapplebaum
Posts: 27
Joined: Sat Sep 13, 2014 3:13 am

Where to put a properties file for custom JAR?

Post by 12140kapplebaum »

My Zimlet is finally working nicely; now it's time to spruce it up. Basically, it's a (Javascript) Zimlet that makes a few Ajax calls to JSP pages, that in turn call Java code that accesses an external database and also calls a RESTful API. To help our IT department with maintaining the thing, I'd like to put the database info (user name, passwords, table names, URLs, etc) in a properties file instead of hard coding. The thing is, I have no idea where to put the properties file. Do I zip it into the zimlet and let Zimbra handle things? Put it somewhere in the Jetty directory? Something else?
Thanks,
12140kapplebaum
Posts: 27
Joined: Sat Sep 13, 2014 3:13 am

Where to put a properties file for custom JAR?

Post by 12140kapplebaum »

*bump*
Anyone?
User avatar
ppearl
Advanced member
Advanced member
Posts: 114
Joined: Thu May 15, 2014 7:36 am

Where to put a properties file for custom JAR?

Post by ppearl »

I think the answer is, "it depends". For most data I usually bundle the properties with the Zimlet, although there have been times where there was a need/desire to store certain data in other locations. For simplicity, I'd tend to lean towards storing things with the Zimlet.
12140kapplebaum
Posts: 27
Joined: Sat Sep 13, 2014 3:13 am

Where to put a properties file for custom JAR?

Post by 12140kapplebaum »

Thanks. Simple is good. I'll bundle it into the Zimlet then.
Best,

Kathy A.
Post Reply