Good morning! I was trying to upload files, where I have a webpage that makes a request for my servlet. In the form of the page I have an input of type file and another one of type text. The coding mode of this form is as "multipart / form-data". My major difficulty is that all the examples I've seen using the package org.apache.tomcat.util.http.fileupload have the following code snippet:
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();
But in my case the error of the image below occurs:
The method parseRequest (RequestContext) in the type FileUploadBase is not applicable for the arguments (HttpServletRequest)
If anyone has any suggestions or has already had the same problem and can help me, I am grateful. Or if you have some other more recommended method of uploading files in java I am accepting tips as this is the first time I am studying this.
Hugs.