• 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

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

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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".
reply
    Bookmark Topic Watch Topic
  • New Topic