This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Best practice - Directory location in the project to place xml file (non framework XML)  RSS feed

 
Gajen Logandan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have to parse an XML file that contains some metadata information. Later the parsed information is used in my java classes. XML file could contain static contents like supported file types etc.
What is the correct directory location for such file? Can I keep it along with the java class file?

Thanks
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well don't know what's the "best practice" for this kind of stuff is. But for me if the XML file has content that "can be changed/updated over time" then put the file outside of the project or app.

Using web app as example even you probably using ejb, I put the xml files in a "xml" folder in the root directory of my web domain. Then in my java web app I retrieve them as "http://hostname/xml/blablabla.xml".
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!