title: Servlet - save file to disk, but not sure what path to use?
body: <p>I have a servlet which accepts a file upload, I'd like to store the file in a specific directory on disk. I'm using jetty. The file system looks like this:</p>
  
  <pre><code>/jetty
    /bin
    /contexts
    /stuff
    /webapps
      foo.war   // one web app
      grok.war  // another web app
    start.jar
  </code></pre>
  
  <p>I start jetty from that start.jar file. In the context of the servlet, I'm not sure how to save the file to my desired destination, the "/stuff" folder:</p>
  
  <pre><code>protected void doPost(HttpServletRequest request, HttpServletResponse response) 
      throws ServletException, IOException 
  {
      File downloaded = new File("some/path/here/stuff"); // ?
  }
  </code></pre>
  
  <p>Yeah - I'm not sure what path to use - is there a way I can print the current working directory in java using the File class to figure that out maybe?</p>
  
  <p>Thanks</p>