title: How to pass the location of file to Java code using JSP?
body: <p>The following is the JSP code.</p>
  
  <p>How the code can be modified such that the location of the file that is selected using "Browse" option must be passed to a java program named new.java</p>
  
  <p>Please advise.</p>
  
  <pre><code>&lt;form action="abc.jsp" method="post" enctype="multipart/form-data" name="form1" id="form1"&gt; 
  
          Upload File:
         &lt;input name="file" type="file" id="file"&gt;&lt;br&gt;&lt;br&gt;
         &lt;input type="submit" name="Submit" value="Submit"/&gt;&lt;br&gt;&lt;br&gt;
         &lt;input type="reset" name="Reset" value="Reset"/&gt;   
   &lt;/form&gt;
  </code></pre>
  
  <p>The html code above shows only the name of the file and not the location. And I dont even know how to pass the name of the file to java code itself. </p>