title: JSP Servlet Upload Image File
body: <p>How can I upload an image using simply JSP and Servlet. I used as below code to get an image in JSP page: </p>
  
  <pre><code>&lt;p&gt;File: &lt;input type="file" name="file_to_upload"&gt; &lt;/p&gt;
  </code></pre>
  
  <p>Now I would like to know how to get these files and how to save them in specific directory ? I named that folder "images", and I would like to put all files these I uploaded in that folder. The images would actually be saved when I restart my server or refresh my page. </p>
  
  <p>How can I achieve this?</p>