Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

252
Visualizações
type=file - should get the value in array instead of single value valuename

Here am passing the file value to another page new.jsp. As per attached Snapshot i have multiple of choose file option as number of rows exist per condition. From the below code, i could get the value of the filename(but while saving in DB only the last one is getting saved for all the filename as commmon) but i couldnt get all the file names in array.

Can someone pls guide how to get all the filenames through array. Thanks in Adv. If i get the filenames in array for all the rows in the table , i can split and save each filemname in DB according to each row.

Attaching the snapshot for refernce: Browse column with multiple column for type=file according to the condition. enter image description here

<input type="file" name="file1" id="file1" multiple="multiple"/>


 $('input[type=file]').change(function () {
console.dir(this.files[0]);
var filename = this.files[0]['file1'];
alert(filename);
$.ajax({
        url : "new.jsp",
        data : {filename : filename}, 
        type: 'post',
        success : function(data) 
        {
        }
       }); 
                                 });  
                                 
**new.jsp** Page

<%

String filename = request.getParameter("filename");
System.out.println("newfilename"+filename);
session.setAttribute("filename", filename);

%>
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda