title: How to read-write json file outside WAR package?
body: <p>I am writing a <code>REST API</code> in <code>Java EE 1.6</code> using <code>JBoss 7</code> and basic EE frameworks. I compile the WAR package and then deploy it to Jboss standalone folder. <em>I was creating a database to store the API configuration, but it is so little (and needs to be full loaded with the servlet) that I decided a JSON file is enough.</em></p>
  
  <p>I want to read and write JSON code to a file outside the WAR package, but in the same server JBoss resides (could even be in the same directory as WAR file or other predefined directory).</p>
  
  <p>The reason is that I need this file to be read and written by other applications also.</p>
  
  <p>So How can I perform that reading and writing in the Servlet? <em>I prefer solutions that includes less dependencies as possible, like no container or framework dependencies, except the JSON and IO libraries, if possible.</em></p>
  
  <p>Thanks in advance!</p>