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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
> 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.

Reply via email to