Re: Re: commons-fileupload2-jakarta

2023-07-11 Thread Gary Gregory
FYI, I plan on pushing a 2.0.0-M1 this week.

Gary

On Tue, Jul 11, 2023 at 8:48 AM Romain Manni-Bucau
 wrote:
>
> Sounds good to me, so something like v2 will target legacy apps migrating
> to jakarta but there will be no v3 so prefer migrating to servlet API - or
> your env API.
>
> Romain Manni-Bucau
> @rmannibucau  |  Blog
>  | Old Blog
>  | Github  |
> LinkedIn  | Book
> 
>
>
> Le mar. 11 juil. 2023 à 14:43, Dennis Kieselhorst  a
> écrit :
>
> > > Not sure I get the why, let me summarize:
> > >
> > > * using [fileupload] in a servlet >= 3 container is conflicting and can
> > > easily mess up things
> > > * servlet provides [fileupload] api
> > > * jetty (since you mentionned it) does not use [fileupload] (
> > >
> > https://github.com/eclipse/jetty.project/blob/jetty-10.0.x/jetty-server/src/main/java/org/eclipse/jetty/server/MultiPartFormInputStream.java#L82
> > )
> > > but only tomcat does
> > >
> >
> > Pretty sure there are more, see linked JIRA tickets. I'm using it here:
> > https://github.com/awslabs/aws-serverless-java-container
> >
> > Let's move ahead with a release and point out in the docs that from a
> > consumer perspective using Servlet API is preferred.
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > For additional commands, e-mail: dev-h...@commons.apache.org
> >
> >

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: Re: commons-fileupload2-jakarta

2023-07-11 Thread Romain Manni-Bucau
Sounds good to me, so something like v2 will target legacy apps migrating
to jakarta but there will be no v3 so prefer migrating to servlet API - or
your env API.

Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | Book



Le mar. 11 juil. 2023 à 14:43, Dennis Kieselhorst  a
écrit :

> > Not sure I get the why, let me summarize:
> >
> > * using [fileupload] in a servlet >= 3 container is conflicting and can
> > easily mess up things
> > * servlet provides [fileupload] api
> > * jetty (since you mentionned it) does not use [fileupload] (
> >
> https://github.com/eclipse/jetty.project/blob/jetty-10.0.x/jetty-server/src/main/java/org/eclipse/jetty/server/MultiPartFormInputStream.java#L82
> )
> > but only tomcat does
> >
>
> Pretty sure there are more, see linked JIRA tickets. I'm using it here:
> https://github.com/awslabs/aws-serverless-java-container
>
> Let's move ahead with a release and point out in the docs that from a
> consumer perspective using Servlet API is preferred.
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


Re: Re: commons-fileupload2-jakarta

2023-07-11 Thread Dennis Kieselhorst
> Not sure I get the why, let me summarize:
> 
> * using [fileupload] in a servlet >= 3 container is conflicting and can
> easily mess up things
> * servlet provides [fileupload] api
> * jetty (since you mentionned it) does not use [fileupload] (
> https://github.com/eclipse/jetty.project/blob/jetty-10.0.x/jetty-server/src/main/java/org/eclipse/jetty/server/MultiPartFormInputStream.java#L82)
> but only tomcat does
> 

Pretty sure there are more, see linked JIRA tickets. I'm using it here: 
https://github.com/awslabs/aws-serverless-java-container 

Let's move ahead with a release and point out in the docs that from a consumer 
perspective using Servlet API is preferred.

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: Re: commons-fileupload2-jakarta

2023-07-11 Thread Romain Manni-Bucau
Le mar. 11 juil. 2023 à 14:13, Maxim Solodovnik  a
écrit :

> from mobile (sorry for typos ;)
>
>
> On Tue, Jul 11, 2023, 18:58 Romain Manni-Bucau 
> wrote:
>
> > @Maxim: exactly, this is why hosting it only in tomcat and using the
> > servlet abstraction is saner since commons is not usable in tomcat
> without
> > relocation or hacks nobdoy wants on any sides and it is the main relevant
> > consumer these days.
> >
>
> Will the same API be available in Jetty for ex.?
>

Theorically it can but in practise no because jetty adds "stages" in its
processing so it does not want to be that lazy otherwise it enables garbage
- their impl choice I guess.


>
> IMO code need to stay in Commons
>

Not sure I get the why, let me summarize:

* using [fileupload] in a servlet >= 3 container is conflicting and can
easily mess up things
* servlet provides [fileupload] api
* jetty (since you mentionned it) does not use [fileupload] (
https://github.com/eclipse/jetty.project/blob/jetty-10.0.x/jetty-server/src/main/java/org/eclipse/jetty/server/MultiPartFormInputStream.java#L82)
but only tomcat does

So overall it would be way more beneficial for end users to push the
(unique?) missing feature in the servlet API and be it rather than keep a
lib which is no more a common thing and is superseeded by a standard API -
from my window.


>
>
>
> > Romain Manni-Bucau
> > @rmannibucau  |  Blog
> >  | Old Blog
> >  | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn  | Book
> > <
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > >
> >
> >
> > Le mar. 11 juil. 2023 à 13:47, Maxim Solodovnik  a
> > écrit :
> >
> > > Tomcat uses the code copy\pasted from commons-fileupload (due to there
> > > was not release)
> > > IMO it is better to use library instead of copy/pasting here and there
> > > .
> > >
> > > On Tue, 11 Jul 2023 at 18:03, Romain Manni-Bucau <
> rmannibu...@gmail.com>
> > > wrote:
> > > >
> > > > This is a good point but guess it is not hard - and would be great -
> to
> > > fix
> > > > it in tomcat, just needs to not use ArrayList but a lazy list which
> > will
> > > > behave like fileupload streaming API. Under the hood the API already
> > uses
> > > > the FileItemIterator , it just needs to be able to populate the list
> > > lazily.
> > > >
> > > > Romain Manni-Bucau
> > > > @rmannibucau  |  Blog
> > > >  | Old Blog
> > > >  | Github <
> > > https://github.com/rmannibucau> |
> > > > LinkedIn  | Book
> > > > <
> > >
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > > >
> > > >
> > > >
> > > > Le mar. 11 juil. 2023 à 12:57, Eugene Grybinnyk
> > > >  a écrit :
> > > >
> > > > > We tried to get rid of commons-fileupload in favour of Servlet API
> > for
> > > our
> > > > > project where we disable multipart and use streaming (not to store
> > > files on
> > > > > the disk). And it looks like Servlet API doesn’t provide a
> convenient
> > > way
> > > > > of streaming the attachments (like commons-fileupload does) so in
> the
> > > end
> > > > > we concluded that we need to implement something similar to what we
> > get
> > > > > from commons-fileupload OR to wait for version
> > commons-fileupload:2.0.
> > > > >
> > > > > On 2023/07/09 14:45:21 Emmanuel Bourg wrote:
> > > > > > Dumb question: what's the benefit of using commons-fileupload in
> > 2023
> > > > > > instead of the equivalent file upload feature of the  Servlet
> API?
> > > > > >
> > > > > > The use case I had in mind was to support file upload in very old
> > > > > > Servlet containers still in production (Tomcat 6 or Jetty 7 for
> > > example,
> > > > > > both EOL), but servers supporting the Jakarta API are recent and
> > have
> > > > > > the file upload feature integrated. I'd expect commons-fileupload
> > to
> > > go
> > > > > > to dormant in the near future rather than adapted for the jakarta
> > > > > namespace.
> > > > > >
> > > > > > What did I miss?
> > > > > >
> > > > > > Emmanuel Bourg
> > > > > >
> > > > > >
> > -
> > > > > > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > > > > > For additional commands, e-mail: dev-h...@commons.apache.org
> > > > > >
> > > > > >
> > >
> > >
> > >
> > > --
> > > Best regards,
> > > Maxim
> > >
> > > -
> > > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > > For additional commands, e-mail: dev-h...@commons.apache.org
> > >
> > >
> >
>


Re: Re: commons-fileupload2-jakarta

2023-07-11 Thread Maxim Solodovnik
from mobile (sorry for typos ;)


On Tue, Jul 11, 2023, 18:58 Romain Manni-Bucau 
wrote:

> @Maxim: exactly, this is why hosting it only in tomcat and using the
> servlet abstraction is saner since commons is not usable in tomcat without
> relocation or hacks nobdoy wants on any sides and it is the main relevant
> consumer these days.
>

Will the same API be available in Jetty for ex.?

IMO code need to stay in Commons



> Romain Manni-Bucau
> @rmannibucau  |  Blog
>  | Old Blog
>  | Github <
> https://github.com/rmannibucau> |
> LinkedIn  | Book
> <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
>
>
> Le mar. 11 juil. 2023 à 13:47, Maxim Solodovnik  a
> écrit :
>
> > Tomcat uses the code copy\pasted from commons-fileupload (due to there
> > was not release)
> > IMO it is better to use library instead of copy/pasting here and there
> > .
> >
> > On Tue, 11 Jul 2023 at 18:03, Romain Manni-Bucau 
> > wrote:
> > >
> > > This is a good point but guess it is not hard - and would be great - to
> > fix
> > > it in tomcat, just needs to not use ArrayList but a lazy list which
> will
> > > behave like fileupload streaming API. Under the hood the API already
> uses
> > > the FileItemIterator , it just needs to be able to populate the list
> > lazily.
> > >
> > > Romain Manni-Bucau
> > > @rmannibucau  |  Blog
> > >  | Old Blog
> > >  | Github <
> > https://github.com/rmannibucau> |
> > > LinkedIn  | Book
> > > <
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > >
> > >
> > >
> > > Le mar. 11 juil. 2023 à 12:57, Eugene Grybinnyk
> > >  a écrit :
> > >
> > > > We tried to get rid of commons-fileupload in favour of Servlet API
> for
> > our
> > > > project where we disable multipart and use streaming (not to store
> > files on
> > > > the disk). And it looks like Servlet API doesn’t provide a convenient
> > way
> > > > of streaming the attachments (like commons-fileupload does) so in the
> > end
> > > > we concluded that we need to implement something similar to what we
> get
> > > > from commons-fileupload OR to wait for version
> commons-fileupload:2.0.
> > > >
> > > > On 2023/07/09 14:45:21 Emmanuel Bourg wrote:
> > > > > Dumb question: what's the benefit of using commons-fileupload in
> 2023
> > > > > instead of the equivalent file upload feature of the  Servlet API?
> > > > >
> > > > > The use case I had in mind was to support file upload in very old
> > > > > Servlet containers still in production (Tomcat 6 or Jetty 7 for
> > example,
> > > > > both EOL), but servers supporting the Jakarta API are recent and
> have
> > > > > the file upload feature integrated. I'd expect commons-fileupload
> to
> > go
> > > > > to dormant in the near future rather than adapted for the jakarta
> > > > namespace.
> > > > >
> > > > > What did I miss?
> > > > >
> > > > > Emmanuel Bourg
> > > > >
> > > > >
> -
> > > > > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > > > > For additional commands, e-mail: dev-h...@commons.apache.org
> > > > >
> > > > >
> >
> >
> >
> > --
> > Best regards,
> > Maxim
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > For additional commands, e-mail: dev-h...@commons.apache.org
> >
> >
>


Re: Re: commons-fileupload2-jakarta

2023-07-11 Thread Romain Manni-Bucau
@Maxim: exactly, this is why hosting it only in tomcat and using the
servlet abstraction is saner since commons is not usable in tomcat without
relocation or hacks nobdoy wants on any sides and it is the main relevant
consumer these days.

Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | Book



Le mar. 11 juil. 2023 à 13:47, Maxim Solodovnik  a
écrit :

> Tomcat uses the code copy\pasted from commons-fileupload (due to there
> was not release)
> IMO it is better to use library instead of copy/pasting here and there
> .
>
> On Tue, 11 Jul 2023 at 18:03, Romain Manni-Bucau 
> wrote:
> >
> > This is a good point but guess it is not hard - and would be great - to
> fix
> > it in tomcat, just needs to not use ArrayList but a lazy list which will
> > behave like fileupload streaming API. Under the hood the API already uses
> > the FileItemIterator , it just needs to be able to populate the list
> lazily.
> >
> > Romain Manni-Bucau
> > @rmannibucau  |  Blog
> >  | Old Blog
> >  | Github <
> https://github.com/rmannibucau> |
> > LinkedIn  | Book
> > <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
> >
> >
> > Le mar. 11 juil. 2023 à 12:57, Eugene Grybinnyk
> >  a écrit :
> >
> > > We tried to get rid of commons-fileupload in favour of Servlet API for
> our
> > > project where we disable multipart and use streaming (not to store
> files on
> > > the disk). And it looks like Servlet API doesn’t provide a convenient
> way
> > > of streaming the attachments (like commons-fileupload does) so in the
> end
> > > we concluded that we need to implement something similar to what we get
> > > from commons-fileupload OR to wait for version commons-fileupload:2.0.
> > >
> > > On 2023/07/09 14:45:21 Emmanuel Bourg wrote:
> > > > Dumb question: what's the benefit of using commons-fileupload in 2023
> > > > instead of the equivalent file upload feature of the  Servlet API?
> > > >
> > > > The use case I had in mind was to support file upload in very old
> > > > Servlet containers still in production (Tomcat 6 or Jetty 7 for
> example,
> > > > both EOL), but servers supporting the Jakarta API are recent and have
> > > > the file upload feature integrated. I'd expect commons-fileupload to
> go
> > > > to dormant in the near future rather than adapted for the jakarta
> > > namespace.
> > > >
> > > > What did I miss?
> > > >
> > > > Emmanuel Bourg
> > > >
> > > > -
> > > > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > > > For additional commands, e-mail: dev-h...@commons.apache.org
> > > >
> > > >
>
>
>
> --
> Best regards,
> Maxim
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


Re: Re: commons-fileupload2-jakarta

2023-07-11 Thread Maxim Solodovnik
Tomcat uses the code copy\pasted from commons-fileupload (due to there
was not release)
IMO it is better to use library instead of copy/pasting here and there .

On Tue, 11 Jul 2023 at 18:03, Romain Manni-Bucau  wrote:
>
> This is a good point but guess it is not hard - and would be great - to fix
> it in tomcat, just needs to not use ArrayList but a lazy list which will
> behave like fileupload streaming API. Under the hood the API already uses
> the FileItemIterator , it just needs to be able to populate the list lazily.
>
> Romain Manni-Bucau
> @rmannibucau  |  Blog
>  | Old Blog
>  | Github  |
> LinkedIn  | Book
> 
>
>
> Le mar. 11 juil. 2023 à 12:57, Eugene Grybinnyk
>  a écrit :
>
> > We tried to get rid of commons-fileupload in favour of Servlet API for our
> > project where we disable multipart and use streaming (not to store files on
> > the disk). And it looks like Servlet API doesn’t provide a convenient way
> > of streaming the attachments (like commons-fileupload does) so in the end
> > we concluded that we need to implement something similar to what we get
> > from commons-fileupload OR to wait for version commons-fileupload:2.0.
> >
> > On 2023/07/09 14:45:21 Emmanuel Bourg wrote:
> > > Dumb question: what's the benefit of using commons-fileupload in 2023
> > > instead of the equivalent file upload feature of the  Servlet API?
> > >
> > > The use case I had in mind was to support file upload in very old
> > > Servlet containers still in production (Tomcat 6 or Jetty 7 for example,
> > > both EOL), but servers supporting the Jakarta API are recent and have
> > > the file upload feature integrated. I'd expect commons-fileupload to go
> > > to dormant in the near future rather than adapted for the jakarta
> > namespace.
> > >
> > > What did I miss?
> > >
> > > Emmanuel Bourg
> > >
> > > -
> > > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > > For additional commands, e-mail: dev-h...@commons.apache.org
> > >
> > >



-- 
Best regards,
Maxim

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: Re: commons-fileupload2-jakarta

2023-07-11 Thread Romain Manni-Bucau
This is a good point but guess it is not hard - and would be great - to fix
it in tomcat, just needs to not use ArrayList but a lazy list which will
behave like fileupload streaming API. Under the hood the API already uses
the FileItemIterator , it just needs to be able to populate the list lazily.

Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | Book



Le mar. 11 juil. 2023 à 12:57, Eugene Grybinnyk
 a écrit :

> We tried to get rid of commons-fileupload in favour of Servlet API for our
> project where we disable multipart and use streaming (not to store files on
> the disk). And it looks like Servlet API doesn’t provide a convenient way
> of streaming the attachments (like commons-fileupload does) so in the end
> we concluded that we need to implement something similar to what we get
> from commons-fileupload OR to wait for version commons-fileupload:2.0.
>
> On 2023/07/09 14:45:21 Emmanuel Bourg wrote:
> > Dumb question: what's the benefit of using commons-fileupload in 2023
> > instead of the equivalent file upload feature of the  Servlet API?
> >
> > The use case I had in mind was to support file upload in very old
> > Servlet containers still in production (Tomcat 6 or Jetty 7 for example,
> > both EOL), but servers supporting the Jakarta API are recent and have
> > the file upload feature integrated. I'd expect commons-fileupload to go
> > to dormant in the near future rather than adapted for the jakarta
> namespace.
> >
> > What did I miss?
> >
> > Emmanuel Bourg
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > For additional commands, e-mail: dev-h...@commons.apache.org
> >
> >


RE: Re: commons-fileupload2-jakarta

2023-07-11 Thread Eugene Grybinnyk
We tried to get rid of commons-fileupload in favour of Servlet API for our 
project where we disable multipart and use streaming (not to store files on the 
disk). And it looks like Servlet API doesn’t provide a convenient way of 
streaming the attachments (like commons-fileupload does) so in the end we 
concluded that we need to implement something similar to what we get from 
commons-fileupload OR to wait for version commons-fileupload:2.0.

On 2023/07/09 14:45:21 Emmanuel Bourg wrote:
> Dumb question: what's the benefit of using commons-fileupload in 2023 
> instead of the equivalent file upload feature of the  Servlet API?
> 
> The use case I had in mind was to support file upload in very old 
> Servlet containers still in production (Tomcat 6 or Jetty 7 for example, 
> both EOL), but servers supporting the Jakarta API are recent and have 
> the file upload feature integrated. I'd expect commons-fileupload to go 
> to dormant in the near future rather than adapted for the jakarta namespace.
> 
> What did I miss?
> 
> Emmanuel Bourg
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
> 
>