You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2023/05/28 13:39:02 UTC
[Bug 66619] New: Cannot upload an image file from a deployed JSP page in Tomcat 10 (10.1.8)
https://bz.apache.org/bugzilla/show_bug.cgi?id=66619
Bug ID: 66619
Summary: Cannot upload an image file from a deployed JSP page
in Tomcat 10 (10.1.8)
Product: Tomcat 10
Version: 10.1.8
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Servlet
Assignee: dev@tomcat.apache.org
Reporter: dbamels@hotmail.com
Target Milestone: ------
Created attachment 38566
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38566&action=edit
Case to reproduce the situation
From Tomcat 10 and onwards there has been a move from Java EE to Jakarta EE as
part of the transfer of Java EE to the Eclipse Foundation, the primary package
for all implemented APIs has changed from javax.* to jakarta.*.
I have a JSP page deployed in Tomcat 10 that is intended to upload a file from
the desktop (Windows 10) to the server where Tomcat 10 is running (OEL 8 -
Oracle Linux 8). I am unable to upload an image, and I get this error:
-
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [24] in the jsp file: [/index.jsp]
The type javax.servlet.http.HttpServletRequest cannot be resolved. It is
indirectly referenced from required type
org.apache.commons.fileupload.servlet.ServletFileUpload
21: ServletFileUpload upload = new ServletFileUpload(factory);
22:
23: // Parse the request
24: List<FileItem> items = upload.parseRequest(request);
25:
26: // Process the uploaded items
27: Iterator<FileItem> iter = items.iterator();
-
The JSP page uses these modules:
<%@ page import="org.apache.commons.fileupload.*" %>
<%@ page import="org.apache.commons.fileupload.disk.*" %>
<%@ page import="org.apache.commons.fileupload.servlet.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="jakarta.servlet.*" %>
<%@ page import="jakarta.servlet.http.*" %>
<%@ page import="jakarta.sql.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="org.apache.commons.fileupload.disk.DiskFileItemFactory" %>
<%@ page import="org.apache.commons.fileupload.FileItemFactory" %>
and these specific jar files:
commons-fileupload-1.5-test-sources.jar
commons-fileupload-1.5-tests.jar
commons-fileupload-1.5-sources.jar
commons-fileupload-1.5-javadoc.jar
commons-fileupload-1.5.jar
Thanks by advance for any tips and suggestions.
PS: See cannot_upload_file_Tomcat10_20230528.txt to reproducw the case.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 66619] Cannot upload an image file from a deployed JSP page in Tomcat 10 (10.1.8)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66619
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
OS| |All
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Bugzilla is not a support forum. Please use the users mailing list:
https://tomcat.apache.org/lists.html
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org