myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samba <saas...@gmail.com>
Subject Re: Trinidad FileUpload failing with Tomahawk Extension Filter
Date Sat, 15 Mar 2008 11:31:33 GMT
Hi! Scott and Mathew,

 does that mean Trnidad File Upload shall not work with Commons File
Uploader or is the converse  also true--- I mean to ask whether  the
tomahawk's commons file uploader will also fail in the presence of Trinidad
Fileuploader ?


 And what if  I need to write my own handling of File Uploading feature --
will that work, or will it also fail because of these diverse file upload
handlers?

Can you please clarify on this ?


If need be , I'll think of rolling my own handler for uploading files if
none of the existing ones work with each other..., but is that possible?
or is it that only one form handler can exist per web app that can process
file uploads?

File Upload is an important feature in our app, and it is highly impossible
to compromise on this requirement.

Thanking you in advance,
Samba


On Sat, Mar 15, 2008 at 12:44 AM, Scott O'Bryan <darkarena@gmail.com> wrote:

> Actually I take that last part back, it will NOT fix the issue now that I
> look at it.  The two are incompatible.
>
> Scott
>
>
> On Fri, Mar 14, 2008 at 1:13 PM, Scott O'Bryan <darkarena@gmail.com>
> wrote:
>
> > Samba, this will not work because Tobago's filter is doing the
> > multi-part form handling.  The two mechanisms are incompatible with each
> > other and will be until we have uniform handling of the multi-part form
> > request.  (I know Matthias, yes the configurator commons is comming...  :)
> > ).
> >
> > Adding the TrinidadFilter mapping BEFORE the Tobago Filter will probably
> > fix the issue.
> >
> > Scott
> >
> >
> > On Fri, Mar 14, 2008 at 5:37 AM, Samba <saasira@gmail.com> wrote:
> >
> > > Hi! Mathew,
> > >
> > > Below I pasted the code of the method referrred;
> > >
> > > *
> > >
> > > public
> > > *String doUpload(){
> > >
> > > *try* {
> > >
> > > BufferedInputStream bis =
> > > *new* BufferedInputStream(((UploadedFile)fileOne).getInputStream());
> > >
> > > OutputStream os =
> > > *null*;
> > >
> > >  System.
> > > *out*.println("ContentType : "+fileOne.getContentType()+"$$$$$$$$$$" +
> > > fileOne.getFilename() );
> > >
> > >  os =
> > > *new* FileOutputStream("C:\\temp\\"+fileOne.getFilename());
> > >
> > >  *int* element;
> > >
> > > *while*((element=bis.read())!=-1){
> > >
> > > os.write(element);
> > >
> > > }
> > >
> > >  }
> > > *catch* (IOException e) {
> > >
> > > // *TODO* Auto-generated catch block
> > >
> > > e.printStackTrace();
> > >
> > > }
> > >
> > > *return* *null*;
> > >
> > > }
> > >
> > > It is working fine even if I have Tomahawk jars and commons-fileupload
> > > jar in my lib, but the moment I add the ExtenstionFilter configuration
> > > entries in the web.xml, it is failing by throwing a NPE..
> > >
> > > hope this is not a bug and will get a solution to the problem soon,
> > > Samba
> > >   On Fri, Mar 14, 2008 at 4:35 PM, Matthias Wessendorf <
> > > matzew@apache.org> wrote:
> > >
> > > > Hi,
> > > >
> > > > ....
> > > > >
> > > > >
> > > > > root cause java.lang.NullPointerException
> > > > >  demo.backing.FileUploadTest.doUpload(FileUploadTest.java:84)
> > > > >  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > > >
> > > > > sun.reflect.NativeMethodAccessorImpl.invoke(
> > > > NativeMethodAccessorImpl.java:39)
> > > > >
> > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > > > DelegatingMethodAccessorImpl.java:25)
> > > >
> > > > *snip*
> > > > can you provide the code of the doUpload() ?
> > > >
> > > > > Is there any known issues of incompatibility of Trinidad
> > > > FileUploader with
> > > > > Tomahawk Extension Filtter?
> > > >
> > > > not that I know...
> > > >
> > > > -Matthias
> > > >
> > > > > Thanking you in advance,
> > > > >
> > > > > --
> > > > > Regards...
> > > > > Samba.
> > > >
> > > >
> > > >
> > > > --
> > > > Matthias Wessendorf
> > > >
> > > > further stuff:
> > > > blog: http://matthiaswessendorf.wordpress.com/
> > > > sessions: http://www.slideshare.net/mwessendorf
> > > > mail: matzew-at-apache-dot-org
> > > >
> > >
> > >
> > >
> > > --
> > > Regards...
> > > Samba.
> >
> >
> >
>


-- 
Regards...
Samba.

Mime
View raw message