You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Amit Jha <am...@gmail.com> on 2006/11/16 12:57:23 UTC

Re: How to add commons:fileupload to tomcat

I think DiskFileItemFactory is not there in the jar you have(might be the
older one).
I was facing the same problem and when I started using common-fileupload
that comes with struts 1.3.5 things were fine.

Regards,
Amit

On 11/16/06, Shervin Asgari <sh...@linpro.no> wrote:
>
> Hello. I have added the commons-fileupload-1.1.1.jar to my WEB-INF/lib
> directory, and I have also included the same jar file in my webapp.jarfile.
>
> But still I seem to have problem using it. I keep getting :
>
> DiskFileItemFactory cannot be resolved to a type
>
>
> I have also tried other classes and get the same error. I have included
>
> <%@ page import="org.apache.commons.fileupload.*"%>
>
> <%@ page import="org.apache.commons.fileupload.servlet.*"%>
>
> <%@ page import="org.apache.commons.fileupload.portlet.*"%>
>
> <%@ page import="org.apache.commons.collections.*"%>
>
> But this doesnt seem to help. Please help.
>
> Shervin Asgari
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

Re: How to add commons:fileupload to tomcat

Posted by Amit Jha <am...@gmail.com>.
The package is
org.apache.commons.fileupload.disk



On 11/16/06, Shervin Asgari <sh...@linpro.no> wrote:
>
> So what can I do?
>
> Shervin Asgari
>
>
> Amit Jha wrote:
> > I think DiskFileItemFactory is not there in the jar you have(might be
> the
> > older one).
> > I was facing the same problem and when I started using common-fileupload
> > that comes with struts 1.3.5 things were fine.
> >
> > Regards,
> > Amit
> >
> > On 11/16/06, Shervin Asgari <sh...@linpro.no> wrote:
> >>
> >> Hello. I have added the commons-fileupload-1.1.1.jar to my WEB-INF/lib
> >> directory, and I have also included the same jar file in my
> >> webapp.jarfile.
> >>
> >> But still I seem to have problem using it. I keep getting :
> >>
> >> DiskFileItemFactory cannot be resolved to a type
> >>
> >>
> >> I have also tried other classes and get the same error. I have included
> >>
> >> <%@ page import="org.apache.commons.fileupload.*"%>
> >>
> >> <%@ page import="org.apache.commons.fileupload.servlet.*"%>
> >>
> >> <%@ page import="org.apache.commons.fileupload.portlet.*"%>
> >>
> >> <%@ page import="org.apache.commons.collections.*"%>
> >>
> >> But this doesnt seem to help. Please help.
> >>
> >> Shervin Asgari
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

Re: How to add commons:fileupload to tomcat

Posted by Martin Cooper <ma...@apache.org>.
On 11/16/06, Martin Cooper <ma...@apache.org> wrote:
>
>
>
> On 11/16/06, Shervin Asgari <sh...@linpro.no> wrote:
> >
> > LOL. I had to add commons.io to make it work. Now everything works fine.
> > I think the documentation is QUITE poor. No where did it say that I
> > needed that package also.
>
>
> It is documented here:
>
> http://jakarta.apache.org/commons/fileupload/dependencies.html
>
> and here:
>
> http://jakarta.apache.org/commons/fileupload/faq.html
>

Oh, and also in the very first section of the User Guide...

--
Martin Cooper


as well as in many messages in the archives of this mailing list.
>
> You would have found the problem more easily if, as someone else already
> suggested, you put your upload code into a servlet instead of trying to do
> this kind of thing in a JSP page.
>
> Of course, patches to the documentation are always welcome.
>
> --
> Martin Cooper
>
>
> Shervin Asgari - System Consultant
> >
> >
> >
> >
> > Shervin Asgari wrote:
> > > So what can I do?
> > >
> > > Shervin Asgari
> > >
> > > Amit Jha wrote:
> > >> I think DiskFileItemFactory is not there in the jar you have(might be
> >
> > >> the
> > >> older one).
> > >> I was facing the same problem and when I started using
> > common-fileupload
> > >> that comes with struts 1.3.5 things were fine.
> > >>
> > >> Regards,
> > >> Amit
> > >>
> > >> On 11/16/06, Shervin Asgari <sh...@linpro.no> wrote:
> > >>>
> > >>> Hello. I have added the commons-fileupload-1.1.1.jar to my
> > WEB-INF/lib
> > >>> directory, and I have also included the same jar file in my
> > >>> webapp.jarfile.
> > >>>
> > >>> But still I seem to have problem using it. I keep getting :
> > >>>
> > >>> DiskFileItemFactory cannot be resolved to a type
> > >>>
> > >>>
> > >>> I have also tried other classes and get the same error. I have
> > included
> > >>>
> > >>> <%@ page import=" org.apache.commons.fileupload.*"%>
> > >>>
> > >>> <%@ page import="org.apache.commons.fileupload.servlet.*"%>
> > >>>
> > >>> <%@ page import="org.apache.commons.fileupload.portlet.* "%>
> > >>>
> > >>> <%@ page import="org.apache.commons.collections.*"%>
> > >>>
> > >>> But this doesnt seem to help. Please help.
> > >>>
> > >>> Shervin Asgari
> > >>>
> > >>>
> > >>>
> > ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > >>> For additional commands, e-mail:
> > commons-user-help@jakarta.apache.org
> > >>>
> > >>>
> > >>
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
>

Re: How to add commons:fileupload to tomcat

Posted by Shervin Asgari <sh...@linpro.no>.
Yes I know. My bad. I saw it now.

Shervin

Martin Cooper wrote:
> On 11/16/06, Shervin Asgari <sh...@linpro.no> wrote:
>>
>> LOL. I had to add commons.io to make it work. Now everything works fine.
>> I think the documentation is QUITE poor. No where did it say that I
>> needed that package also.
>
>
> It is documented here:
>
> http://jakarta.apache.org/commons/fileupload/dependencies.html
>
> and here:
>
> http://jakarta.apache.org/commons/fileupload/faq.html
>
> as well as in many messages in the archives of this mailing list.
>
> You would have found the problem more easily if, as someone else already
> suggested, you put your upload code into a servlet instead of trying 
> to do
> this kind of thing in a JSP page.
>
> Of course, patches to the documentation are always welcome.
>
> -- 
> Martin Cooper
>
>
> Shervin Asgari - System Consultant
>>
>>
>>
>>
>> Shervin Asgari wrote:
>> > So what can I do?
>> >
>> > Shervin Asgari
>> >
>> > Amit Jha wrote:
>> >> I think DiskFileItemFactory is not there in the jar you have(might be
>> >> the
>> >> older one).
>> >> I was facing the same problem and when I started using
>> common-fileupload
>> >> that comes with struts 1.3.5 things were fine.
>> >>
>> >> Regards,
>> >> Amit
>> >>
>> >> On 11/16/06, Shervin Asgari <sh...@linpro.no> wrote:
>> >>>
>> >>> Hello. I have added the commons-fileupload-1.1.1.jar to my 
>> WEB-INF/lib
>> >>> directory, and I have also included the same jar file in my
>> >>> webapp.jarfile.
>> >>>
>> >>> But still I seem to have problem using it. I keep getting :
>> >>>
>> >>> DiskFileItemFactory cannot be resolved to a type
>> >>>
>> >>>
>> >>> I have also tried other classes and get the same error. I have
>> included
>> >>>
>> >>> <%@ page import="org.apache.commons.fileupload.*"%>
>> >>>
>> >>> <%@ page import="org.apache.commons.fileupload.servlet.*"%>
>> >>>
>> >>> <%@ page import="org.apache.commons.fileupload.portlet.*"%>
>> >>>
>> >>> <%@ page import="org.apache.commons.collections.*"%>
>> >>>
>> >>> But this doesnt seem to help. Please help.
>> >>>
>> >>> Shervin Asgari
>> >>>
>> >>>
>> >>> 
>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>> >>> For additional commands, e-mail: 
>> commons-user-help@jakarta.apache.org
>> >>>
>> >>>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: How to add commons:fileupload to tomcat

Posted by Martin Cooper <ma...@apache.org>.
On 11/16/06, Shervin Asgari <sh...@linpro.no> wrote:
>
> LOL. I had to add commons.io to make it work. Now everything works fine.
> I think the documentation is QUITE poor. No where did it say that I
> needed that package also.


It is documented here:

http://jakarta.apache.org/commons/fileupload/dependencies.html

and here:

http://jakarta.apache.org/commons/fileupload/faq.html

as well as in many messages in the archives of this mailing list.

You would have found the problem more easily if, as someone else already
suggested, you put your upload code into a servlet instead of trying to do
this kind of thing in a JSP page.

Of course, patches to the documentation are always welcome.

--
Martin Cooper


Shervin Asgari - System Consultant
>
>
>
>
> Shervin Asgari wrote:
> > So what can I do?
> >
> > Shervin Asgari
> >
> > Amit Jha wrote:
> >> I think DiskFileItemFactory is not there in the jar you have(might be
> >> the
> >> older one).
> >> I was facing the same problem and when I started using
> common-fileupload
> >> that comes with struts 1.3.5 things were fine.
> >>
> >> Regards,
> >> Amit
> >>
> >> On 11/16/06, Shervin Asgari <sh...@linpro.no> wrote:
> >>>
> >>> Hello. I have added the commons-fileupload-1.1.1.jar to my WEB-INF/lib
> >>> directory, and I have also included the same jar file in my
> >>> webapp.jarfile.
> >>>
> >>> But still I seem to have problem using it. I keep getting :
> >>>
> >>> DiskFileItemFactory cannot be resolved to a type
> >>>
> >>>
> >>> I have also tried other classes and get the same error. I have
> included
> >>>
> >>> <%@ page import="org.apache.commons.fileupload.*"%>
> >>>
> >>> <%@ page import="org.apache.commons.fileupload.servlet.*"%>
> >>>
> >>> <%@ page import="org.apache.commons.fileupload.portlet.*"%>
> >>>
> >>> <%@ page import="org.apache.commons.collections.*"%>
> >>>
> >>> But this doesnt seem to help. Please help.
> >>>
> >>> Shervin Asgari
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> >>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >>>
> >>>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

Re: How to add commons:fileupload to tomcat

Posted by Shervin Asgari <sh...@linpro.no>.
LOL. I had to add commons.io to make it work. Now everything works fine. 
I think the documentation is QUITE poor. No where did it say that I 
needed that package also.

Shervin Asgari - System Consultant




Shervin Asgari wrote:
> So what can I do?
>
> Shervin Asgari
>
> Amit Jha wrote:
>> I think DiskFileItemFactory is not there in the jar you have(might be 
>> the
>> older one).
>> I was facing the same problem and when I started using common-fileupload
>> that comes with struts 1.3.5 things were fine.
>>
>> Regards,
>> Amit
>>
>> On 11/16/06, Shervin Asgari <sh...@linpro.no> wrote:
>>>
>>> Hello. I have added the commons-fileupload-1.1.1.jar to my WEB-INF/lib
>>> directory, and I have also included the same jar file in my 
>>> webapp.jarfile.
>>>
>>> But still I seem to have problem using it. I keep getting :
>>>
>>> DiskFileItemFactory cannot be resolved to a type
>>>
>>>
>>> I have also tried other classes and get the same error. I have included
>>>
>>> <%@ page import="org.apache.commons.fileupload.*"%>
>>>
>>> <%@ page import="org.apache.commons.fileupload.servlet.*"%>
>>>
>>> <%@ page import="org.apache.commons.fileupload.portlet.*"%>
>>>
>>> <%@ page import="org.apache.commons.collections.*"%>
>>>
>>> But this doesnt seem to help. Please help.
>>>
>>> Shervin Asgari
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: How to add commons:fileupload to tomcat

Posted by Shervin Asgari <sh...@linpro.no>.
So what can I do?

Shervin Asgari 


Amit Jha wrote:
> I think DiskFileItemFactory is not there in the jar you have(might be the
> older one).
> I was facing the same problem and when I started using common-fileupload
> that comes with struts 1.3.5 things were fine.
>
> Regards,
> Amit
>
> On 11/16/06, Shervin Asgari <sh...@linpro.no> wrote:
>>
>> Hello. I have added the commons-fileupload-1.1.1.jar to my WEB-INF/lib
>> directory, and I have also included the same jar file in my 
>> webapp.jarfile.
>>
>> But still I seem to have problem using it. I keep getting :
>>
>> DiskFileItemFactory cannot be resolved to a type
>>
>>
>> I have also tried other classes and get the same error. I have included
>>
>> <%@ page import="org.apache.commons.fileupload.*"%>
>>
>> <%@ page import="org.apache.commons.fileupload.servlet.*"%>
>>
>> <%@ page import="org.apache.commons.fileupload.portlet.*"%>
>>
>> <%@ page import="org.apache.commons.collections.*"%>
>>
>> But this doesnt seem to help. Please help.
>>
>> Shervin Asgari
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org