Display a list of files in a directory using Java Web

0

Good afternoon, I have a directory called "musics" with 23 files.

I'm using this class:

public listarArquivos() throws IOException {
    File file = new File(diretorio);
    File musicas[] = file.listFiles();
    int i = 0;
    for (int j = musicas.length; i < j; i++) {
        File arquivos = musicas[i];
        System.out.println(arquivos.getName());
    }

Music appears on the console.

Now how do I get into jsp?

Thank you

    
asked by anonymous 14.03.2018 / 19:56

0 answers