You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Guy Bashan <gu...@gmail.com> on 2008/05/24 19:45:16 UTC

[Myaces][Tomahawk] File Upload

Hi All,

 

I have been fighting with file upload with progress in a JSF form for over a
week with no luck.

To do the upload I am using my own filter, that process the upload and puts
in the session the progress information.

It seems like my filter is called only after Tomahawk extensions filter
finishes the upload.

Can I cancel Tomahawk file upload processing (I will handle the processing
with my filter instead).

 

Thanks,

Guy.


RE: [Myaces][Tomahawk] File Upload

Posted by Guy Bashan <gu...@gmail.com>.
Thanks,

I just did that, and for some reason that I can understand, I keep getting
the same behavior:

First file is uploaded, only after file completed uploading all progress
events are being triggered at once (I see a long progress list in the log
file exactly after upload is finished, instead of seeing the log lines being
added along the upload progress).

I can't figure out why I keep getting this behavior.

 

Guy.

 

From: Scott O'Bryan [mailto:darkarena@gmail.com] 
Sent: Saturday, May 24, 2008 8:52 PM
To: MyFaces Discussion
Cc: MyFaces Discussion
Subject: Re: [Myaces][Tomahawk] File Upload

 

Why not put your code IN the tomogawk filter?

On May 24, 2008, at 11:45 AM, Guy Bashan <gu...@gmail.com> wrote:

Hi All,

 

I have been fighting with file upload with progress in a JSF form for over a
week with no luck.

To do the upload I am using my own filter, that process the upload and puts
in the session the progress information.

It seems like my filter is called only after Tomahawk extensions filter
finishes the upload.

Can I cancel Tomahawk file upload processing (I will handle the processing
with my filter instead).

 

Thanks,


Re: [Myaces][Tomahawk] File Upload

Posted by Scott O'Bryan <da...@gmail.com>.
Why not put your code IN the tomogawk filter?

On May 24, 2008, at 11:45 AM, Guy Bashan <gu...@gmail.com> wrote:

> Hi All,
>
>
>
> I have been fighting with file upload with progress in a JSF form  
> for over a week with no luck.
>
> To do the upload I am using my own filter, that process the upload  
> and puts in the session the progress information.
>
> It seems like my filter is called only after Tomahawk extensions  
> filter finishes the upload.
>
> Can I cancel Tomahawk file upload processing (I will handle the  
> processing with my filter instead).
>
>
>
> Thanks,
>

RE: [Myaces][Tomahawk] File Upload

Posted by simon <si...@chello.at>.
On Sun, 2008-05-25 at 13:06 +0300, Guy Bashan wrote:
> I know,
> 
> I tried everything, putting my filter first, changing ExtensionsFilter code.
> Nothing changes the weird behavior on production server. Locally all works
> great.
> 
> Right now, I suspect that it is simply not related to Java/JSF but must be
> something related with nginx.

If your custom filter is first in the list, but is not getting run, then
your problem is not MyFaces-related, and you need to figure out what is
screwed up in your environment first before posting questions here.

Regards,
Simon


RE: [Myaces][Tomahawk] File Upload

Posted by Guy Bashan <gu...@gmail.com>.
I know,

I tried everything, putting my filter first, changing ExtensionsFilter code.
Nothing changes the weird behavior on production server. Locally all works
great.

Right now, I suspect that it is simply not related to Java/JSF but must be
something related with nginx.

Thanks,
Guy.

-----Original Message-----
From: simon [mailto:simon.kitching@chello.at] 
Sent: Sunday, May 25, 2008 12:31 PM
To: MyFaces Discussion
Subject: Re: [Myaces][Tomahawk] File Upload


On Sat, 2008-05-24 at 20:45 +0300, Guy Bashan wrote:
> Hi All,
> 
>  
> 
> I have been fighting with file upload with progress in a JSF form for
> over a week with no luck.
> 
> To do the upload I am using my own filter, that process the upload and
> puts in the session the progress information.
> 
> It seems like my filter is called only after Tomahawk extensions
> filter finishes the upload.
> 
> Can I cancel Tomahawk file upload processing (I will handle the
> processing with my filter instead).

The servlet engine runs filters in the order in which the
<servlet-mapping> elements are defined in the web.xml file. This is
standard servlet stuff.

So if you want your servlet to run first, put its <servlet-mapping>
entry first. It should check whether this is a multi-part post. If so,
then do your custom handling and do not pass the request down.

Regards,
Simon



Re: [Myaces][Tomahawk] File Upload

Posted by simon <si...@chello.at>.
On Sat, 2008-05-24 at 20:45 +0300, Guy Bashan wrote:
> Hi All,
> 
>  
> 
> I have been fighting with file upload with progress in a JSF form for
> over a week with no luck.
> 
> To do the upload I am using my own filter, that process the upload and
> puts in the session the progress information.
> 
> It seems like my filter is called only after Tomahawk extensions
> filter finishes the upload.
> 
> Can I cancel Tomahawk file upload processing (I will handle the
> processing with my filter instead).

The servlet engine runs filters in the order in which the
<servlet-mapping> elements are defined in the web.xml file. This is
standard servlet stuff.

So if you want your servlet to run first, put its <servlet-mapping>
entry first. It should check whether this is a multi-part post. If so,
then do your custom handling and do not pass the request down.

Regards,
Simon