On 14/05/2021 23:17, Orendt, John wrote:
Hi
I found sample code for an UploadServlet with these imports
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
This worked well with Tomcat 9.
However, when I switched to a new Windows 10 device, I installed Tomcat 10.05
After, replacing javax with jakara in imports most Servlets worked well, with
the exception of UploadServlet Which uses the above imports.
Assuming you changed your source code to use the jakarta.* imports and
compiled your project against the Jakarta APIs (servlet-api.jar etc
provided by Tomcat 10) then the problem is that Commons FileUpload is
written for Java EE 8 (with javax.* packages) but you are using Jakarta
EE 9 (with jakarta.* packages).
Commons FileUpload is working on a Jakarta EE version. In the meantime,
you can use the Tomcat Migration Tool for Jakarta EE to convert Commons
FileUpload to Jakarta EE and then compile against the converted JAR.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org