Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty 11 and commons-fileupload

On Sat, Apr 17, 2021 at 9:42 AM John English <john.foreign@xxxxxxxxx> wrote:
On 16/04/2021 18:18, Eitan Rosenberg wrote:
>
> I have been using Jetty 9 with commons-fileupload  for my own private
> use for some time.
> https://commons.apache.org/proper/commons-fileupload/
> <https://commons.apache.org/proper/commons-fileupload/>

I had some problems with commons-fileupload recently. Someone pointed
out that it's file uploading is supported natively in the servlet spec,
as javax.servlet.http.Part and is quite easy to use. I converted my code
quite easily -- the only hassle is that servlets using it need to have a
     <multipart-config/> tag inside the <servlet> setup in the web.xml.

I believe that this also exists as jakarta.servlet.http.Part, so this
might be the way to go.

I wholeheartedly support using jakarta.servlet.http.Part (or the older javax.servlet.http.Part)

If you define your servlets with annotations, you can also use the @MultiPartConfig annotation (instead of defining it in the web.xml)

Back to the top