title: Display multiple input files in JSP
body: <p>i had a file input which can display multiple files selected in the table made below which has two columns,one is name of file and second is path of file to be dispalyed in each column.</p>
  
  <p>The problem is that it is not showing the name of file in the table column and i want to select multiple files and display it in the column below.The problem is that after clicking the ok button of alert box the path of file is dissapearing.</p>
  
  <p>plz tell me how i can display the file path and name in the table column without using the alert box and after clicking submit.</p>
  
  <p>here is my code:-</p>
  
  <pre><code>&lt;html&gt;
  
  
  
  &lt;head&gt;
  
  
  
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  
  
  
  &lt;title&gt;Insert title here&lt;/title&gt;
  
  
  
  &lt;script type="text/javascript"&gt;
  
  
  
   function xyz()
  
  
   {
       var inp = document.getElementById('sel_ect').value;
  
  
  
  
       document.getElementById('txt').value = inp;
  
  
  
       alert("here is a file name: " +inp);
  
  
  
       }
  
  
  
  &lt;/script&gt;
  
  
  &lt;/head&gt;
  
  
  
  &lt;body&gt;
  
  
  
  &lt;form name="sel_f" id="select" method="post"  enctype="multipart/form-data"&gt;
  
  
  
  
  &lt;table&gt;
  
  
  &lt;tr&gt;&lt;td&gt;&lt;label for="sel_ect"&gt;Select File&lt;/label&gt;&lt;/td&gt;
  
  
  
  
  &lt;td&gt;&lt;input type="file" id="sel_ect" name="sel" /&gt;&lt;/td&gt;
  
  
  
  
  &lt;/tr&gt;
  
  
  
  &lt;/table&gt;
  
  
  
  &lt;center&gt;
  
  
  
  &lt;input type="Submit" value="Submit" name="Submit" onclick="xyz()" /&gt;
  
  
  
  
  &lt;input type="Reset" value="Reset" name="Reset"/&gt;
  
  
  
  
  &lt;/center&gt;
  
  
  
  
  &lt;table id="file" width="96%"  align="center" cellpadding="0" cellspacing="0" border="1"&gt;
  
  
  
    &lt;tr id="row" &gt;
  
  
  
                                &lt;th&gt;File name&lt;/th&gt; 
  
  
  
                                &lt;th&gt;File Path&lt;/th&gt;
  
  
  
  
                                &lt;/tr&gt;
  
  
  
  &lt;tr&gt;
  
  
  
  
  &lt;td width="47" height="14"&gt;&lt;input type="text" id="txet" size="10" value="" name="bgi" &gt;&lt;/td&gt;
  
  
  
  
  &lt;td width="137" height="14"&gt;&lt;input type="text" id="txt" size="10" value="" name="bg" &gt;&lt;/td&gt;
  
   &lt;/tr&gt;
  
  
  
  
   &lt;/table&gt;
  
  
  
   &lt;/form&gt;
  
  
  
   &lt;/body&gt;
  
  
  
   &lt;/html&gt;
  </code></pre>