You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Thomas Hoffmann (Speed4Trade GmbH)" <Th...@speed4trade.com.INVALID> on 2023/04/20 14:26:30 UTC
ServletFileUpload not available in Tomcat 10.1
Hello,
we are upgrading from Tomcat 10 to Tomcat 10.1
We are currently using
ServletFileUpload.isMultipartContent(request)
(from org.apache.tomcat.util.http.fileupload.servlet.ServletFileUpload)
It seems that the whole Servlet was removed in Tomcat 10.1
https://github.com/apache/tomcat/tree/main/java/org/apache/tomcat/util/http/fileupload/servlet
I couldn't find any hints in the Tomcat 10.1 changelog.
Is there a replacement for this servlet or any background information why it was removed?
Thanks!
Thomas
AW: ServletFileUpload not available in Tomcat 10.1
Posted by "Thomas Hoffmann (Speed4Trade GmbH)" <Th...@speed4trade.com.INVALID>.
Hello Chris,
thank you for the quick reply :)
> -----Ursprüngliche Nachricht-----
> Von: Christopher Schultz <ch...@christopherschultz.net>
> Gesendet: Donnerstag, 20. April 2023 17:31
> An: users@tomcat.apache.org
> Betreff: Re: ServletFileUpload not available in Tomcat 10.1
>
> Thomas,
>
> On 4/20/23 10:26, Thomas Hoffmann (Speed4Trade GmbH) wrote:
> > we are upgrading from Tomcat 10 to Tomcat 10.1
> >
> > We are currently using
> > ServletFileUpload.isMultipartContent(request)
> > (from
> > org.apache.tomcat.util.http.fileupload.servlet.ServletFileUpload)
> >
> > It seems that the whole Servlet was removed in Tomcat 10.1
> > https://github.com/apache/tomcat/tree/main/java/org/apache/tomcat/util
> > /http/fileupload/servlet
> >
> > I couldn't find any hints in the Tomcat 10.1 changelog.
> > Is there a replacement for this servlet or any background information why it
> was removed?
>
> The org.apache.tomcat.util.http.fileupload package is intended to be used
> internally by Tomcat only. Tomcat does not use the ServletFileUpload class and
> so it was removed from the private, internal copy.
>
> Tomcat uses a package-renamed (aka shaded) distribution of commons-
> fileupload to provide the multipart facilities required by the Servlet
> specification. The package is shaded to avoid conflicts with applications that
> may have the same library bundled with them for whatever reason. It is not
> intended to be used directly by any application code.
>
> If you want to use commons-fileupload, you should supply the commons-
> fileupload JAR file and use the public package which is
> org.apache.commons.fileupload.
>
> -chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
Re: ServletFileUpload not available in Tomcat 10.1
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Thomas,
On 4/20/23 10:26, Thomas Hoffmann (Speed4Trade GmbH) wrote:
> we are upgrading from Tomcat 10 to Tomcat 10.1
>
> We are currently using
> ServletFileUpload.isMultipartContent(request)
> (from org.apache.tomcat.util.http.fileupload.servlet.ServletFileUpload)
>
> It seems that the whole Servlet was removed in Tomcat 10.1
> https://github.com/apache/tomcat/tree/main/java/org/apache/tomcat/util/http/fileupload/servlet
>
> I couldn't find any hints in the Tomcat 10.1 changelog.
> Is there a replacement for this servlet or any background information why it was removed?
The org.apache.tomcat.util.http.fileupload package is intended to be
used internally by Tomcat only. Tomcat does not use the
ServletFileUpload class and so it was removed from the private, internal
copy.
Tomcat uses a package-renamed (aka shaded) distribution of
commons-fileupload to provide the multipart facilities required by the
Servlet specification. The package is shaded to avoid conflicts with
applications that may have the same library bundled with them for
whatever reason. It is not intended to be used directly by any
application code.
If you want to use commons-fileupload, you should supply the
commons-fileupload JAR file and use the public package which is
org.apache.commons.fileupload.
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org