title: Save the PDF file generated in servlet to a directory on the computer
body: <p><a href="https://stackoverflow.com/questions/18538163/generate-pdf-file-in-an-appropriate-format">Generate PDF file in an appropriate format</a> I asked here about how to prompt the PDF to be saved in its response. </p>
  
  <p>Now I would like to make the file save at a predetermined directory on the container's file system (say D:\pdf on windows). So if I understand correctly instead of ServletOutputStream I would need a FileOutputStream. </p>
  
  <p>So I think I would need to bypass writing to ServletOutputStream and use File IO. What do you think about my approach? Any advice would be much obliged!  </p>
  
  <p>Edit: I was a bit confused as to how streams work. And in general about the servers local file system. Anyways I appreciate your bearing with me and making my confusion go away</p>