title: Create A File in the WebContent Folder From Java
body: <p>I wanted to know how to create a file in the WebContent folder of a dynamic web project using Java?</p>
  
  <p>The basic question remaining is how to get the path of the WebContent folder.</p>
  
  <p>Note: No servlet is to be used!</p>
  
  <p>Edit:</p>
  
  <p>Okay, i am trying to create a new xml file from java method.  I want the file to be created in the WebContent folder so that the file is created even when the application is deployed.</p>
  
  <p>I am using Jboss, maven, JSF to create the dynamic web project.  I need the xml file to pass data to highcharts.  Please note that i will be using this method only.</p>
  
  <p>Overview:</p>
  
  <p>Create xml file on request</p>
  
  <p>XML file to created in the WebContent folder itself</p>
  
  <p>Use this xml file to pass data</p>