The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from required .class files

14 views Asked by At

I am using Tomcat 10 ( Jakarta EE implementation ) in my project, and using CommonFileUpload jar with implementation "FileUploadBase.isMultipartContent(request);". isMultipartContent expect request argument of type javax not jakarta. And in commonFileUpload jar only javax package is imported like "import javax.servlet.http.HttpServletRequest". One method I found to use MultipartConfig but how to implement this method in my project.

m_isRequestContainFiles = FileUploadBase.isMultipartContent(request);

    if (m_isRequestContainFiles){
        I have upload = new DiskFileUpload();
        try {
            m_fieldsWhenFormContainsFiles = **upload.parseRequest(request);**

Can anyone help me how to implement multipartconfig method here with import jakarta.servlet.* import org.apache.commons.fileupload.*;

I want to use only Jakarta servlet in my project as I am using Tomcat 10.

0

There are 0 answers