Lista,
Estou tentando ler um arquivo e para isso tive que usar enctype=“multipart/form-data” na minha página jsp.
Só que ganho um erro de java.langOutOfMemoryError qdo carrego o arquivo
ganho um erro java.lang.OutOfMemoryError.
Pesquisando no google ví que um colega já passou por essa sitaução e ele propõe essa solução:
This line is part of the problem:
byte buff[]=new byte[(int)file.length()];
You are trying to store the entire file in memory. And therefore you run Out Of Memory. To solve your problem, don’t do that. When you go to upload the file, read it in a piece at a time and write those pieces one at a time to the DataOutputStream.
Pergunto: Como eu faço para fazer upoload em partes??? Ou vc tem outra sugestão???
muito obrigado,
Marques