1
Good morning! I was trying to upload files, where I have a web page that makes a request to my Folder. In the form of the page I have an input of type file and another of type text. The encoding mode of this form is as "Multipart/form-data". My great difficulty is that all the examples I’ve seen of using package org.apache.Tomcat.util.http.fileupload have the following snippet of code:
try
{
// Analisar a solicitação para obter itens de arquivo.
List <FileItem>fileItems = upload.parseRequest(request);
// Processar os itens de arquivos enviados
Iterator <FileItem> i = fileItems.iterator();
However in my case occurs the error of the image below:
The method parseRequest(Requestcontext) in the type Fileuploadbase is not applicable for the Arguments (Httpservletrequest)
If anyone has any suggestions or has ever had the same problem and can help me, I appreciate it. Or if you have any other more recommended method of uploading files in java I am accepting tips, because this is the first time I am studying about it.
Hugs.
That worked, thank you so much for the answer, I was breaking my head a long time ago :)
– Carlos Rafael de Oliveira Carn
I’m glad it worked out.
– LR10