You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by veena pandit <v....@gmail.com> on 2009/11/03 19:26:27 UTC

Trinidad file upload

Hi,

I am having trouble making this work.  I have configured the web.xml,
faces-config.xml
and followed the instructions on the following page:

http://myfaces.apache.org/trinidad/devguide/fileUpload.html.

I get a following popup error:
Message from webpage:
A file upload error has occured, please verify your upload data and file
name.

Thanks,

Veena

Re: Trinidad file upload

Posted by Matthias Wessendorf <mw...@gmail.com>.
Again, add the required jar...

Sent from my iPod.

On 03.11.2009, at 21:39, veena pandit <v....@gmail.com> wrote:

> When I run it outside of eclipse and in my Firefox I get the following
> message(this is intermittant):
>
>
> java.lang.NoClassDefFoundError:
> org/apache/commons/fileupload/servlet/ServletFileUpload
>    org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter 
> (ExtensionsFilter.java:321)
>
> **
> Remember I have Tomahawk upload in the same page.
>
> Thanks,
>
> Veena
>
> On Tue, Nov 3, 2009 at 4:03 PM, Martin Kočí <Ma...@aura.cz> wr 
> ote:
>
>> It seems that message "A file upload error has occurred, please  
>> verify
>> your upload data and file name" occures on client and has nothing  
>> to do
>> with server configuration. Can you please try  a simple example:
>>
>> <tr:form usesUpload="true">
>> <tr:inputFile value="#{yourBean.uploadFile}" />
>> </tr:form>
>>
>> if it works - if not please look in Firefox at "Tools" -> "Error
>> Console" if there is any error.
>>
>>
>> veena pandit píše v Út 03. 11. 2009 v 14:56 -0500:
>>> Hi Martin,
>>>
>>> I checked my web.xml and the ordering is already the way you state  
>>> it
>> should
>>> be. Anything else I can check for?
>>>
>>> Thanks,
>>>
>>> Veena
>>>
>>> On Tue, Nov 3, 2009 at 3:24 PM, Martin Kočí <Martin.Koci@aura.cz 
>>> > wrote:
>>>
>>>> Hi,
>>>>
>>>> it is a known limitation, it depends on filters ordering in  
>>>> web.xml.
>>>> .
>>>> Look in your web.xml and put something like:
>>>>
>>>> <filter-mapping>
>>>>   <filter-name>trinidad</filter-name>
>>>>   <servlet-name>faces</servlet-name>
>>>> </filter-mapping>
>>>>
>>>> before
>>>>
>>>> <filter-mapping>
>>>>   <filter-name>MyFacesExtensionsFilter</filter-name>
>>>>   <servlet-name>faces</servlet-name>
>>>> </filter-mapping>
>>>>
>>>> Filter declared first will "consume" file upload.
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Martin
>>>>
>>>>
>>>>
>>>>
>>>> veena pandit píše v Út 03. 11. 2009 v 14:00 -0500:
>>>>> I configured it according to the trinidad web page.
>>>>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html
>>>>>
>>>>> Trinidad and Tomahawk are working well together.  I am using  
>>>>> Trinidad
>> for
>>>> a
>>>>> drop down and Tomahawk for file upload from BalusC's blog.  But I
>> just
>>>> added
>>>>> the Trinidad File upload functionality to the web application and
>> that is
>>>>> the only thing that is not working.  I just thought I would use
>> Trinidad
>>>> for
>>>>> both so I could have a common look and feel since this application
>> will
>>>> go
>>>>> into production eventually.
>>>>>
>>>>> I could not find anything else specific to any problems with  
>>>>> Trinidad
>>>> file
>>>>> upload.
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Veena
>>>>>
>>>>> On Tue, Nov 3, 2009 at 1:51 PM, Matthias Wessendorf <
>> matzew@apache.org
>>>>> wrote:
>>>>>
>>>>>> are you sure that you have everything configured correct ?
>>>>>>
>>>>>> Trinidad and tomahawk ?
>>>>>>
>>>>>> I think i remember some issues on the upload case, when mixing  
>>>>>> them
>>>>>> (trinidad and
>>>>>> tomahawk). Perhaps searching the archives gives any hint ? I  
>>>>>> really
>>>>>> don't remember it
>>>>>>
>>>>>> -Matthias
>>>>>>
>>>>>> On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com>
>>>> wrote:
>>>>>>> Well, I have both Tomahawk and trinidad in the same application
>> for
>>>> file
>>>>>>> uploads.
>>>>>>> I added commons.io to the web-inf/lib directory and now I dont
>> get
>>>> any
>>>>>> error
>>>>>>> messages in the log.  I just get the popup error message once
>> again.
>>>> I
>>>>>> am
>>>>>>> using trinidad for another control in the same page.  But I was
>> also
>>>>>> trying
>>>>>>> to use trinidad for the upload as well.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Veena
>>>>>>>
>>>>>>> On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <
>>>> matzew@apache.org
>>>>>>> wrote:
>>>>>>>
>>>>>>>> This is not Trinidad, this is Tomahawk.
>>>>>>>>
>>>>>>>> The "NoClassDefFoundError" says that you don't
>>>>>>>> have the "ServletFileUpload" from the given package
>>>>>>>> in your classpath. This class is part of the Apache Commons
>>>>>>>> Upload project, which is required by Tomahawk.
>>>>>>>>
>>>>>>>> -Matthias
>>>>>>>>
>>>>>>>> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <
>> v.kris21@gmail.com>
>>>>>> wrote:
>>>>>>>>> A new development.  Now I am getting this error in the log:
>>>>>>>>> All I was getting before this is a popup error message.
>>>>>>>>> Now here is the stacktrace:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> SEVERE: Servlet.service() for servlet Faces Servlet threw
>>>> exception
>>>>>>>>>
>>>>>>>>> java.lang.NoClassDefFoundError:
>>>>>>>>> org/apache/commons/fileupload/servlet/ServletFileUpload
>>>>>>>>>
>>>>>>>>> at
>> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
>>>>>>>>> ExtensionsFilter.java:321*)
>>>>>>>>>
>>>>>>>>> *Thanks,*
>>>>>>>>> **
>>>>>>>>> *Veena*
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <
>>>>>> matzew@apache.org
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> do you have a little bit more information ?
>>>>>>>>>>
>>>>>>>>>> cfg, size of the file. error message, stack trace...
>>>>>>>>>>
>>>>>>>>>> -Matthias
>>>>>>>>>>
>>>>>>>>>> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <
>> v.kris21@gmail.com
>>>>>
>>>>>>>> wrote:
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> I am having trouble making this work.  I have configured
>> the
>>>>>> web.xml,
>>>>>>>>>>> faces-config.xml
>>>>>>>>>>> and followed the instructions on the following page:
>>>>>>>>>>>
>>>>>>>>>>>
>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
>>>>>>>>>>>
>>>>>>>>>>> I get a following popup error:
>>>>>>>>>>> Message from webpage:
>>>>>>>>>>> A file upload error has occured, please verify your upload
>> data
>>>> and
>>>>>>>> file
>>>>>>>>>>> name.
>>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>>
>>>>>>>>>>> Veena
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Matthias Wessendorf
>>>>>>>>>>
>>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Matthias Wessendorf
>>>>>>>>
>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Matthias Wessendorf
>>>>>>
>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>
>>>>
>>>>
>>
>>

Re: Trinidad file upload

Posted by veena pandit <v....@gmail.com>.
When I run it outside of eclipse and in my Firefox I get the following
message(this is intermittant):


java.lang.NoClassDefFoundError:
org/apache/commons/fileupload/servlet/ServletFileUpload
	org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:321)

 **
Remember I have Tomahawk upload in the same page.

Thanks,

Veena

On Tue, Nov 3, 2009 at 4:03 PM, Martin Kočí <Ma...@aura.cz> wrote:

> It seems that message "A file upload error has occurred, please verify
> your upload data and file name" occures on client and has nothing to do
> with server configuration. Can you please try  a simple example:
>
> <tr:form usesUpload="true">
> <tr:inputFile value="#{yourBean.uploadFile}" />
> </tr:form>
>
> if it works - if not please look in Firefox at "Tools" -> "Error
> Console" if there is any error.
>
>
> veena pandit píše v Út 03. 11. 2009 v 14:56 -0500:
>  > Hi Martin,
> >
> > I checked my web.xml and the ordering is already the way you state it
> should
> > be. Anything else I can check for?
> >
> > Thanks,
> >
> > Veena
> >
> > On Tue, Nov 3, 2009 at 3:24 PM, Martin Kočí <Ma...@aura.cz> wrote:
> >
> > > Hi,
> > >
> > > it is a known limitation, it depends on filters ordering in web.xml.
> > > .
> > > Look in your web.xml and put something like:
> > >
> > > <filter-mapping>
> > >    <filter-name>trinidad</filter-name>
> > >    <servlet-name>faces</servlet-name>
> > >  </filter-mapping>
> > >
> > > before
> > >
> > > <filter-mapping>
> > >    <filter-name>MyFacesExtensionsFilter</filter-name>
> > >    <servlet-name>faces</servlet-name>
> > > </filter-mapping>
> > >
> > > Filter declared first will "consume" file upload.
> > >
> > >
> > > Regards,
> > >
> > > Martin
> > >
> > >
> > >
> > >
> > > veena pandit píše v Út 03. 11. 2009 v 14:00 -0500:
> > >  > I configured it according to the trinidad web page.
> > > > http://myfaces.apache.org/trinidad/devguide/fileUpload.html
> > > >
> > > > Trinidad and Tomahawk are working well together.  I am using Trinidad
> for
> > > a
> > > > drop down and Tomahawk for file upload from BalusC's blog.  But I
> just
> > > added
> > > > the Trinidad File upload functionality to the web application and
> that is
> > > > the only thing that is not working.  I just thought I would use
> Trinidad
> > > for
> > > > both so I could have a common look and feel since this application
> will
> > > go
> > > > into production eventually.
> > > >
> > > > I could not find anything else specific to any problems with Trinidad
> > > file
> > > > upload.
> > > >
> > > > Thanks.
> > > >
> > > > Veena
> > > >
> > > > On Tue, Nov 3, 2009 at 1:51 PM, Matthias Wessendorf <
> matzew@apache.org
> > > >wrote:
> > > >
> > > > > are you sure that you have everything configured correct ?
> > > > >
> > > > > Trinidad and tomahawk ?
> > > > >
> > > > > I think i remember some issues on the upload case, when mixing them
> > > > > (trinidad and
> > > > > tomahawk). Perhaps searching the archives gives any hint ? I really
> > > > > don't remember it
> > > > >
> > > > > -Matthias
> > > > >
> > > > > On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com>
> > > wrote:
> > > > > > Well, I have both Tomahawk and trinidad in the same application
> for
> > > file
> > > > > > uploads.
> > > > > > I added commons.io to the web-inf/lib directory and now I dont
> get
> > > any
> > > > > error
> > > > > > messages in the log.  I just get the popup error message once
> again.
> > >  I
> > > > > am
> > > > > > using trinidad for another control in the same page.  But I was
> also
> > > > > trying
> > > > > > to use trinidad for the upload as well.
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > Veena
> > > > > >
> > > > > > On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <
> > > matzew@apache.org
> > > > > >wrote:
> > > > > >
> > > > > >> This is not Trinidad, this is Tomahawk.
> > > > > >>
> > > > > >> The "NoClassDefFoundError" says that you don't
> > > > > >> have the "ServletFileUpload" from the given package
> > > > > >> in your classpath. This class is part of the Apache Commons
> > > > > >> Upload project, which is required by Tomahawk.
> > > > > >>
> > > > > >> -Matthias
> > > > > >>
> > > > > >> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <
> v.kris21@gmail.com>
> > > > > wrote:
> > > > > >> > A new development.  Now I am getting this error in the log:
> > > > > >> > All I was getting before this is a popup error message.
> > > > > >> > Now here is the stacktrace:
> > > > > >> >
> > > > > >> >
> > > > > >> > SEVERE: Servlet.service() for servlet Faces Servlet threw
> > > exception
> > > > > >> >
> > > > > >> > java.lang.NoClassDefFoundError:
> > > > > >> > org/apache/commons/fileupload/servlet/ServletFileUpload
> > > > > >> >
> > > > > >> > at
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
> > > > > >> > ExtensionsFilter.java:321*)
> > > > > >> >
> > > > > >> > *Thanks,*
> > > > > >> > **
> > > > > >> > *Veena*
> > > > > >> >
> > > > > >> >
> > > > > >> >
> > > > > >> > On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <
> > > > > matzew@apache.org
> > > > > >> >wrote:
> > > > > >> >
> > > > > >> >> do you have a little bit more information ?
> > > > > >> >>
> > > > > >> >> cfg, size of the file. error message, stack trace...
> > > > > >> >>
> > > > > >> >> -Matthias
> > > > > >> >>
> > > > > >> >> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <
> v.kris21@gmail.com
> > > >
> > > > > >> wrote:
> > > > > >> >> > Hi,
> > > > > >> >> >
> > > > > >> >> > I am having trouble making this work.  I have configured
> the
> > > > > web.xml,
> > > > > >> >> > faces-config.xml
> > > > > >> >> > and followed the instructions on the following page:
> > > > > >> >> >
> > > > > >> >> >
> http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
> > > > > >> >> >
> > > > > >> >> > I get a following popup error:
> > > > > >> >> > Message from webpage:
> > > > > >> >> > A file upload error has occured, please verify your upload
> data
> > > and
> > > > > >> file
> > > > > >> >> > name.
> > > > > >> >> >
> > > > > >> >> > Thanks,
> > > > > >> >> >
> > > > > >> >> > Veena
> > > > > >> >> >
> > > > > >> >>
> > > > > >> >>
> > > > > >> >>
> > > > > >> >> --
> > > > > >> >> Matthias Wessendorf
> > > > > >> >>
> > > > > >> >> blog: http://matthiaswessendorf.wordpress.com/
> > > > > >> >> sessions: http://www.slideshare.net/mwessendorf
> > > > > >> >> twitter: http://twitter.com/mwessendorf
> > > > > >> >>
> > > > > >> >
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >> --
> > > > > >>  Matthias Wessendorf
> > > > > >>
> > > > > >> blog: http://matthiaswessendorf.wordpress.com/
> > > > > >> sessions: http://www.slideshare.net/mwessendorf
> > > > > >> twitter: http://twitter.com/mwessendorf
> > > > > >>
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > >  Matthias Wessendorf
> > > > >
> > > > > blog: http://matthiaswessendorf.wordpress.com/
> > > > > sessions: http://www.slideshare.net/mwessendorf
> > > > > twitter: http://twitter.com/mwessendorf
> > > > >
> > >
> > >
>
>

Re: Trinidad file upload

Posted by Martin Kočí <Ma...@aura.cz>.
That example was only a fragment, minimal working view with trinidad and
JSPs can look like:

uploadFile.jspx:

<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
          xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
          xmlns:trh="http://myfaces.apache.org/trinidad/html"
          xmlns:tr="http://myfaces.apache.org/trinidad">
  <jsp:directive.page contentType="text/html;charset=utf-8"/>
  <f:view>
    <tr:document title="InputFile Demo">
      <tr:form usesUpload="true">
          <tr:inputFile label="Label" value="#{bean.uploadedFile}" />
          <tr:commandButton text="Submit"/>
      </tr:form>
    </tr:document>
  </f:view>
</jsp:root>

This should work and if it doesn't you have probably something badly
configured.

Please notice that there can be used only one upload system in your web
application : trinidad or tomahawk. Mixing both together in one webapp
isn't possible because of HTML multipart upload nature. And of course
be aware of: org.apache.myfaces.trinidad.model.UploadedFile vs.
commons-upload API.




veena pandit píše v Út 03. 11. 2009 v 15:51 -0500:
> Martin,
> 
> Hi,  I tried a small demo app and I followed your instructions;  I get the
> following errors:
> 
> _submitFormCheck is not defined
> http://localhost:8080/TrUpload/mypage.jsp line 34
> 
> _checkLoad is not defined
> http://localhost:8080/TrUpload/mypage.jsp line 1
> 
> _submitForm is not defined
> http://localhost:8080/TrUpload/mypage.jsp line 1.
> 
> What am I doing wrong?
> 
> Thanks,
> 
> Veena
> 
> On Tue, Nov 3, 2009 at 4:03 PM, Martin Kočí <Ma...@aura.cz> wrote:
> 
> > It seems that message "A file upload error has occurred, please verify
> > your upload data and file name" occures on client and has nothing to do
> > with server configuration. Can you please try  a simple example:
> >
> > <tr:form usesUpload="true">
> > <tr:inputFile value="#{yourBean.uploadFile}" />
> > </tr:form>
> >
> > if it works - if not please look in Firefox at "Tools" -> "Error
> > Console" if there is any error.
> >
> >
> > veena pandit píše v Út 03. 11. 2009 v 14:56 -0500:
> >  > Hi Martin,
> > >
> > > I checked my web.xml and the ordering is already the way you state it
> > should
> > > be. Anything else I can check for?
> > >
> > > Thanks,
> > >
> > > Veena
> > >
> > > On Tue, Nov 3, 2009 at 3:24 PM, Martin Kočí <Ma...@aura.cz> wrote:
> > >
> > > > Hi,
> > > >
> > > > it is a known limitation, it depends on filters ordering in web.xml.
> > > > .
> > > > Look in your web.xml and put something like:
> > > >
> > > > <filter-mapping>
> > > >    <filter-name>trinidad</filter-name>
> > > >    <servlet-name>faces</servlet-name>
> > > >  </filter-mapping>
> > > >
> > > > before
> > > >
> > > > <filter-mapping>
> > > >    <filter-name>MyFacesExtensionsFilter</filter-name>
> > > >    <servlet-name>faces</servlet-name>
> > > > </filter-mapping>
> > > >
> > > > Filter declared first will "consume" file upload.
> > > >
> > > >
> > > > Regards,
> > > >
> > > > Martin
> > > >
> > > >
> > > >
> > > >
> > > > veena pandit píše v Út 03. 11. 2009 v 14:00 -0500:
> > > >  > I configured it according to the trinidad web page.
> > > > > http://myfaces.apache.org/trinidad/devguide/fileUpload.html
> > > > >
> > > > > Trinidad and Tomahawk are working well together.  I am using Trinidad
> > for
> > > > a
> > > > > drop down and Tomahawk for file upload from BalusC's blog.  But I
> > just
> > > > added
> > > > > the Trinidad File upload functionality to the web application and
> > that is
> > > > > the only thing that is not working.  I just thought I would use
> > Trinidad
> > > > for
> > > > > both so I could have a common look and feel since this application
> > will
> > > > go
> > > > > into production eventually.
> > > > >
> > > > > I could not find anything else specific to any problems with Trinidad
> > > > file
> > > > > upload.
> > > > >
> > > > > Thanks.
> > > > >
> > > > > Veena
> > > > >
> > > > > On Tue, Nov 3, 2009 at 1:51 PM, Matthias Wessendorf <
> > matzew@apache.org
> > > > >wrote:
> > > > >
> > > > > > are you sure that you have everything configured correct ?
> > > > > >
> > > > > > Trinidad and tomahawk ?
> > > > > >
> > > > > > I think i remember some issues on the upload case, when mixing them
> > > > > > (trinidad and
> > > > > > tomahawk). Perhaps searching the archives gives any hint ? I really
> > > > > > don't remember it
> > > > > >
> > > > > > -Matthias
> > > > > >
> > > > > > On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com>
> > > > wrote:
> > > > > > > Well, I have both Tomahawk and trinidad in the same application
> > for
> > > > file
> > > > > > > uploads.
> > > > > > > I added commons.io to the web-inf/lib directory and now I dont
> > get
> > > > any
> > > > > > error
> > > > > > > messages in the log.  I just get the popup error message once
> > again.
> > > >  I
> > > > > > am
> > > > > > > using trinidad for another control in the same page.  But I was
> > also
> > > > > > trying
> > > > > > > to use trinidad for the upload as well.
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > > > Veena
> > > > > > >
> > > > > > > On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <
> > > > matzew@apache.org
> > > > > > >wrote:
> > > > > > >
> > > > > > >> This is not Trinidad, this is Tomahawk.
> > > > > > >>
> > > > > > >> The "NoClassDefFoundError" says that you don't
> > > > > > >> have the "ServletFileUpload" from the given package
> > > > > > >> in your classpath. This class is part of the Apache Commons
> > > > > > >> Upload project, which is required by Tomahawk.
> > > > > > >>
> > > > > > >> -Matthias
> > > > > > >>
> > > > > > >> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <
> > v.kris21@gmail.com>
> > > > > > wrote:
> > > > > > >> > A new development.  Now I am getting this error in the log:
> > > > > > >> > All I was getting before this is a popup error message.
> > > > > > >> > Now here is the stacktrace:
> > > > > > >> >
> > > > > > >> >
> > > > > > >> > SEVERE: Servlet.service() for servlet Faces Servlet threw
> > > > exception
> > > > > > >> >
> > > > > > >> > java.lang.NoClassDefFoundError:
> > > > > > >> > org/apache/commons/fileupload/servlet/ServletFileUpload
> > > > > > >> >
> > > > > > >> > at
> > org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
> > > > > > >> > ExtensionsFilter.java:321*)
> > > > > > >> >
> > > > > > >> > *Thanks,*
> > > > > > >> > **
> > > > > > >> > *Veena*
> > > > > > >> >
> > > > > > >> >
> > > > > > >> >
> > > > > > >> > On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <
> > > > > > matzew@apache.org
> > > > > > >> >wrote:
> > > > > > >> >
> > > > > > >> >> do you have a little bit more information ?
> > > > > > >> >>
> > > > > > >> >> cfg, size of the file. error message, stack trace...
> > > > > > >> >>
> > > > > > >> >> -Matthias
> > > > > > >> >>
> > > > > > >> >> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <
> > v.kris21@gmail.com
> > > > >
> > > > > > >> wrote:
> > > > > > >> >> > Hi,
> > > > > > >> >> >
> > > > > > >> >> > I am having trouble making this work.  I have configured
> > the
> > > > > > web.xml,
> > > > > > >> >> > faces-config.xml
> > > > > > >> >> > and followed the instructions on the following page:
> > > > > > >> >> >
> > > > > > >> >> >
> > http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
> > > > > > >> >> >
> > > > > > >> >> > I get a following popup error:
> > > > > > >> >> > Message from webpage:
> > > > > > >> >> > A file upload error has occured, please verify your upload
> > data
> > > > and
> > > > > > >> file
> > > > > > >> >> > name.
> > > > > > >> >> >
> > > > > > >> >> > Thanks,
> > > > > > >> >> >
> > > > > > >> >> > Veena
> > > > > > >> >> >
> > > > > > >> >>
> > > > > > >> >>
> > > > > > >> >>
> > > > > > >> >> --
> > > > > > >> >> Matthias Wessendorf
> > > > > > >> >>
> > > > > > >> >> blog: http://matthiaswessendorf.wordpress.com/
> > > > > > >> >> sessions: http://www.slideshare.net/mwessendorf
> > > > > > >> >> twitter: http://twitter.com/mwessendorf
> > > > > > >> >>
> > > > > > >> >
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >> --
> > > > > > >>  Matthias Wessendorf
> > > > > > >>
> > > > > > >> blog: http://matthiaswessendorf.wordpress.com/
> > > > > > >> sessions: http://www.slideshare.net/mwessendorf
> > > > > > >> twitter: http://twitter.com/mwessendorf
> > > > > > >>
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > >  Matthias Wessendorf
> > > > > >
> > > > > > blog: http://matthiaswessendorf.wordpress.com/
> > > > > > sessions: http://www.slideshare.net/mwessendorf
> > > > > > twitter: http://twitter.com/mwessendorf
> > > > > >
> > > >
> > > >
> >
> >


Re: Trinidad file upload

Posted by veena pandit <v....@gmail.com>.
I redeployed it and the errors in the Firefox console are gone.  But I still
get the popup dialog error.  And I checked my jsp(jsf) page against the code
that Martin sent and it looks correct.

Thanks,

Veena
On Tue, Nov 3, 2009 at 6:57 PM, Richard Yee <ri...@gmail.com> wrote:

> I suggest that you get a simple page with only the file upload tag in
> it working first before attempting a page that mixes different JSF
> library tags.
>
> -Richard
>
>
> On Tue, Nov 3, 2009 at 3:28 PM, veena pandit <v....@gmail.com> wrote:
> > I do not have a resource servlet.  But the tomahawk demo works without a
> > resource servlet.  I did have tr:document.  I removed it to see if it
> would
> > fix the error but it did not.
> >
> > Thanks,
> >
> > Veena
> >
> > On Tue, Nov 3, 2009 at 4:07 PM, Matthias Wessendorf
> > <mw...@gmail.com>wrote:
> >
> >> Do you have the Resource servlet? Are you having tr:document ?
> >>
> >> Sent from my iPod.
> >>
> >>
> >> On 03.11.2009, at 21:51, veena pandit <v....@gmail.com> wrote:
> >>
> >> Martin,
> >>>
> >>> Hi,  I tried a small demo app and I followed your instructions;  I get
> the
> >>> following errors:
> >>>
> >>> _submitFormCheck is not defined
> >>> http://localhost:8080/TrUpload/mypage.jsp line 34
> >>>
> >>> _checkLoad is not defined
> >>> http://localhost:8080/TrUpload/mypage.jsp line 1
> >>>
> >>> _submitForm is not defined
> >>> http://localhost:8080/TrUpload/mypage.jsp line 1.
> >>>
> >>> What am I doing wrong?
> >>>
> >>> Thanks,
> >>>
> >>> Veena
> >>>
> >>> On Tue, Nov 3, 2009 at 4:03 PM, Martin Kočí <Ma...@aura.cz>
> wrote:
> >>>
> >>> It seems that message "A file upload error has occurred, please verify
> >>>> your upload data and file name" occures on client and has nothing to
> do
> >>>> with server configuration. Can you please try  a simple example:
> >>>>
> >>>> <tr:form usesUpload="true">
> >>>> <tr:inputFile value="#{yourBean.uploadFile}" />
> >>>> </tr:form>
> >>>>
> >>>> if it works - if not please look in Firefox at "Tools" -> "Error
> >>>> Console" if there is any error.
> >>>>
> >>>>
> >>>> veena pandit píše v Út 03. 11. 2009 v 14:56 -0500:
> >>>>
> >>>>> Hi Martin,
> >>>>>
> >>>>> I checked my web.xml and the ordering is already the way you state it
> >>>>>
> >>>> should
> >>>>
> >>>>> be. Anything else I can check for?
> >>>>>
> >>>>> Thanks,
> >>>>>
> >>>>> Veena
> >>>>>
> >>>>> On Tue, Nov 3, 2009 at 3:24 PM, Martin Kočí <Ma...@aura.cz>
> >>>>> wrote:
> >>>>>
> >>>>> Hi,
> >>>>>>
> >>>>>> it is a known limitation, it depends on filters ordering in web.xml.
> >>>>>> .
> >>>>>> Look in your web.xml and put something like:
> >>>>>>
> >>>>>> <filter-mapping>
> >>>>>>  <filter-name>trinidad</filter-name>
> >>>>>>  <servlet-name>faces</servlet-name>
> >>>>>> </filter-mapping>
> >>>>>>
> >>>>>> before
> >>>>>>
> >>>>>> <filter-mapping>
> >>>>>>  <filter-name>MyFacesExtensionsFilter</filter-name>
> >>>>>>  <servlet-name>faces</servlet-name>
> >>>>>> </filter-mapping>
> >>>>>>
> >>>>>> Filter declared first will "consume" file upload.
> >>>>>>
> >>>>>>
> >>>>>> Regards,
> >>>>>>
> >>>>>> Martin
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> veena pandit píše v Út 03. 11. 2009 v 14:00 -0500:
> >>>>>>
> >>>>>>> I configured it according to the trinidad web page.
> >>>>>>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html
> >>>>>>>
> >>>>>>> Trinidad and Tomahawk are working well together.  I am using
> Trinidad
> >>>>>>>
> >>>>>> for
> >>>>
> >>>>> a
> >>>>>>
> >>>>>>> drop down and Tomahawk for file upload from BalusC's blog.  But I
> >>>>>>>
> >>>>>> just
> >>>>
> >>>>> added
> >>>>>>
> >>>>>>> the Trinidad File upload functionality to the web application and
> >>>>>>>
> >>>>>> that is
> >>>>
> >>>>>  the only thing that is not working.  I just thought I would use
> >>>>>>>
> >>>>>> Trinidad
> >>>>
> >>>>> for
> >>>>>>
> >>>>>>> both so I could have a common look and feel since this application
> >>>>>>>
> >>>>>> will
> >>>>
> >>>>> go
> >>>>>>
> >>>>>>> into production eventually.
> >>>>>>>
> >>>>>>> I could not find anything else specific to any problems with
> Trinidad
> >>>>>>>
> >>>>>> file
> >>>>>>
> >>>>>>> upload.
> >>>>>>>
> >>>>>>> Thanks.
> >>>>>>>
> >>>>>>> Veena
> >>>>>>>
> >>>>>>> On Tue, Nov 3, 2009 at 1:51 PM, Matthias Wessendorf <
> >>>>>>>
> >>>>>> matzew@apache.org
> >>>>
> >>>>>  wrote:
> >>>>>>>
> >>>>>>> are you sure that you have everything configured correct ?
> >>>>>>>>
> >>>>>>>> Trinidad and tomahawk ?
> >>>>>>>>
> >>>>>>>> I think i remember some issues on the upload case, when mixing
> them
> >>>>>>>> (trinidad and
> >>>>>>>> tomahawk). Perhaps searching the archives gives any hint ? I
> really
> >>>>>>>> don't remember it
> >>>>>>>>
> >>>>>>>> -Matthias
> >>>>>>>>
> >>>>>>>> On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com>
> >>>>>>>>
> >>>>>>> wrote:
> >>>>>>
> >>>>>>>  Well, I have both Tomahawk and trinidad in the same application
> >>>>>>>>>
> >>>>>>>> for
> >>>>
> >>>>> file
> >>>>>>
> >>>>>>>  uploads.
> >>>>>>>>> I added commons.io to the web-inf/lib directory and now I dont
> >>>>>>>>>
> >>>>>>>> get
> >>>>
> >>>>> any
> >>>>>>
> >>>>>>> error
> >>>>>>>>
> >>>>>>>>> messages in the log.  I just get the popup error message once
> >>>>>>>>>
> >>>>>>>> again.
> >>>>
> >>>>> I
> >>>>>>
> >>>>>>> am
> >>>>>>>>
> >>>>>>>>> using trinidad for another control in the same page.  But I was
> >>>>>>>>>
> >>>>>>>> also
> >>>>
> >>>>>  trying
> >>>>>>>>
> >>>>>>>>> to use trinidad for the upload as well.
> >>>>>>>>>
> >>>>>>>>> Thanks,
> >>>>>>>>>
> >>>>>>>>> Veena
> >>>>>>>>>
> >>>>>>>>> On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <
> >>>>>>>>>
> >>>>>>>> matzew@apache.org
> >>>>>>
> >>>>>>>  wrote:
> >>>>>>>>>
> >>>>>>>>> This is not Trinidad, this is Tomahawk.
> >>>>>>>>>>
> >>>>>>>>>> The "NoClassDefFoundError" says that you don't
> >>>>>>>>>> have the "ServletFileUpload" from the given package
> >>>>>>>>>> in your classpath. This class is part of the Apache Commons
> >>>>>>>>>> Upload project, which is required by Tomahawk.
> >>>>>>>>>>
> >>>>>>>>>> -Matthias
> >>>>>>>>>>
> >>>>>>>>>> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <
> >>>>>>>>>>
> >>>>>>>>> v.kris21@gmail.com>
> >>>>
> >>>>>  wrote:
> >>>>>>>>
> >>>>>>>>>  A new development.  Now I am getting this error in the log:
> >>>>>>>>>>> All I was getting before this is a popup error message.
> >>>>>>>>>>> Now here is the stacktrace:
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> SEVERE: Servlet.service() for servlet Faces Servlet threw
> >>>>>>>>>>>
> >>>>>>>>>> exception
> >>>>>>
> >>>>>>>
> >>>>>>>>>>> java.lang.NoClassDefFoundError:
> >>>>>>>>>>> org/apache/commons/fileupload/servlet/ServletFileUpload
> >>>>>>>>>>>
> >>>>>>>>>>> at
> >>>>>>>>>>>
> >>>>>>>>>> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
> >>>>
> >>>>>    ExtensionsFilter.java:321*)
> >>>>>>>>>>>
> >>>>>>>>>>> *Thanks,*
> >>>>>>>>>>> **
> >>>>>>>>>>> *Veena*
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <
> >>>>>>>>>>>
> >>>>>>>>>> matzew@apache.org
> >>>>>>>>
> >>>>>>>>>  wrote:
> >>>>>>>>>>>
> >>>>>>>>>>> do you have a little bit more information ?
> >>>>>>>>>>>>
> >>>>>>>>>>>> cfg, size of the file. error message, stack trace...
> >>>>>>>>>>>>
> >>>>>>>>>>>> -Matthias
> >>>>>>>>>>>>
> >>>>>>>>>>>> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <
> >>>>>>>>>>>>
> >>>>>>>>>>> v.kris21@gmail.com
> >>>>
> >>>>>
> >>>>>>>  wrote:
> >>>>>>>>>>
> >>>>>>>>>>>  Hi,
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> I am having trouble making this work.  I have configured
> >>>>>>>>>>>>>
> >>>>>>>>>>>> the
> >>>>
> >>>>>  web.xml,
> >>>>>>>>
> >>>>>>>>>   faces-config.xml
> >>>>>>>>>>>>> and followed the instructions on the following page:
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
> >>>>
> >>>>>
> >>>>>>>>>>>>> I get a following popup error:
> >>>>>>>>>>>>> Message from webpage:
> >>>>>>>>>>>>> A file upload error has occured, please verify your upload
> >>>>>>>>>>>>>
> >>>>>>>>>>>> data
> >>>>
> >>>>> and
> >>>>>>
> >>>>>>>  file
> >>>>>>>>>>
> >>>>>>>>>>>  name.
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> Thanks,
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> Veena
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> --
> >>>>>>>>>>>> Matthias Wessendorf
> >>>>>>>>>>>>
> >>>>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
> >>>>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
> >>>>>>>>>>>> twitter: http://twitter.com/mwessendorf
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> --
> >>>>>>>>>> Matthias Wessendorf
> >>>>>>>>>>
> >>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
> >>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
> >>>>>>>>>> twitter: http://twitter.com/mwessendorf
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>> Matthias Wessendorf
> >>>>>>>>
> >>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
> >>>>>>>> sessions: http://www.slideshare.net/mwessendorf
> >>>>>>>> twitter: http://twitter.com/mwessendorf
> >>>>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >
>

Re: Trinidad file upload

Posted by Richard Yee <ri...@gmail.com>.
I suggest that you get a simple page with only the file upload tag in
it working first before attempting a page that mixes different JSF
library tags.

-Richard


On Tue, Nov 3, 2009 at 3:28 PM, veena pandit <v....@gmail.com> wrote:
> I do not have a resource servlet.  But the tomahawk demo works without a
> resource servlet.  I did have tr:document.  I removed it to see if it would
> fix the error but it did not.
>
> Thanks,
>
> Veena
>
> On Tue, Nov 3, 2009 at 4:07 PM, Matthias Wessendorf
> <mw...@gmail.com>wrote:
>
>> Do you have the Resource servlet? Are you having tr:document ?
>>
>> Sent from my iPod.
>>
>>
>> On 03.11.2009, at 21:51, veena pandit <v....@gmail.com> wrote:
>>
>> Martin,
>>>
>>> Hi,  I tried a small demo app and I followed your instructions;  I get the
>>> following errors:
>>>
>>> _submitFormCheck is not defined
>>> http://localhost:8080/TrUpload/mypage.jsp line 34
>>>
>>> _checkLoad is not defined
>>> http://localhost:8080/TrUpload/mypage.jsp line 1
>>>
>>> _submitForm is not defined
>>> http://localhost:8080/TrUpload/mypage.jsp line 1.
>>>
>>> What am I doing wrong?
>>>
>>> Thanks,
>>>
>>> Veena
>>>
>>> On Tue, Nov 3, 2009 at 4:03 PM, Martin Kočí <Ma...@aura.cz> wrote:
>>>
>>> It seems that message "A file upload error has occurred, please verify
>>>> your upload data and file name" occures on client and has nothing to do
>>>> with server configuration. Can you please try  a simple example:
>>>>
>>>> <tr:form usesUpload="true">
>>>> <tr:inputFile value="#{yourBean.uploadFile}" />
>>>> </tr:form>
>>>>
>>>> if it works - if not please look in Firefox at "Tools" -> "Error
>>>> Console" if there is any error.
>>>>
>>>>
>>>> veena pandit píše v Út 03. 11. 2009 v 14:56 -0500:
>>>>
>>>>> Hi Martin,
>>>>>
>>>>> I checked my web.xml and the ordering is already the way you state it
>>>>>
>>>> should
>>>>
>>>>> be. Anything else I can check for?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Veena
>>>>>
>>>>> On Tue, Nov 3, 2009 at 3:24 PM, Martin Kočí <Ma...@aura.cz>
>>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>>
>>>>>> it is a known limitation, it depends on filters ordering in web.xml.
>>>>>> .
>>>>>> Look in your web.xml and put something like:
>>>>>>
>>>>>> <filter-mapping>
>>>>>>  <filter-name>trinidad</filter-name>
>>>>>>  <servlet-name>faces</servlet-name>
>>>>>> </filter-mapping>
>>>>>>
>>>>>> before
>>>>>>
>>>>>> <filter-mapping>
>>>>>>  <filter-name>MyFacesExtensionsFilter</filter-name>
>>>>>>  <servlet-name>faces</servlet-name>
>>>>>> </filter-mapping>
>>>>>>
>>>>>> Filter declared first will "consume" file upload.
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Martin
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> veena pandit píše v Út 03. 11. 2009 v 14:00 -0500:
>>>>>>
>>>>>>> I configured it according to the trinidad web page.
>>>>>>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html
>>>>>>>
>>>>>>> Trinidad and Tomahawk are working well together.  I am using Trinidad
>>>>>>>
>>>>>> for
>>>>
>>>>> a
>>>>>>
>>>>>>> drop down and Tomahawk for file upload from BalusC's blog.  But I
>>>>>>>
>>>>>> just
>>>>
>>>>> added
>>>>>>
>>>>>>> the Trinidad File upload functionality to the web application and
>>>>>>>
>>>>>> that is
>>>>
>>>>>  the only thing that is not working.  I just thought I would use
>>>>>>>
>>>>>> Trinidad
>>>>
>>>>> for
>>>>>>
>>>>>>> both so I could have a common look and feel since this application
>>>>>>>
>>>>>> will
>>>>
>>>>> go
>>>>>>
>>>>>>> into production eventually.
>>>>>>>
>>>>>>> I could not find anything else specific to any problems with Trinidad
>>>>>>>
>>>>>> file
>>>>>>
>>>>>>> upload.
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>> Veena
>>>>>>>
>>>>>>> On Tue, Nov 3, 2009 at 1:51 PM, Matthias Wessendorf <
>>>>>>>
>>>>>> matzew@apache.org
>>>>
>>>>>  wrote:
>>>>>>>
>>>>>>> are you sure that you have everything configured correct ?
>>>>>>>>
>>>>>>>> Trinidad and tomahawk ?
>>>>>>>>
>>>>>>>> I think i remember some issues on the upload case, when mixing them
>>>>>>>> (trinidad and
>>>>>>>> tomahawk). Perhaps searching the archives gives any hint ? I really
>>>>>>>> don't remember it
>>>>>>>>
>>>>>>>> -Matthias
>>>>>>>>
>>>>>>>> On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com>
>>>>>>>>
>>>>>>> wrote:
>>>>>>
>>>>>>>  Well, I have both Tomahawk and trinidad in the same application
>>>>>>>>>
>>>>>>>> for
>>>>
>>>>> file
>>>>>>
>>>>>>>  uploads.
>>>>>>>>> I added commons.io to the web-inf/lib directory and now I dont
>>>>>>>>>
>>>>>>>> get
>>>>
>>>>> any
>>>>>>
>>>>>>> error
>>>>>>>>
>>>>>>>>> messages in the log.  I just get the popup error message once
>>>>>>>>>
>>>>>>>> again.
>>>>
>>>>> I
>>>>>>
>>>>>>> am
>>>>>>>>
>>>>>>>>> using trinidad for another control in the same page.  But I was
>>>>>>>>>
>>>>>>>> also
>>>>
>>>>>  trying
>>>>>>>>
>>>>>>>>> to use trinidad for the upload as well.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> Veena
>>>>>>>>>
>>>>>>>>> On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <
>>>>>>>>>
>>>>>>>> matzew@apache.org
>>>>>>
>>>>>>>  wrote:
>>>>>>>>>
>>>>>>>>> This is not Trinidad, this is Tomahawk.
>>>>>>>>>>
>>>>>>>>>> The "NoClassDefFoundError" says that you don't
>>>>>>>>>> have the "ServletFileUpload" from the given package
>>>>>>>>>> in your classpath. This class is part of the Apache Commons
>>>>>>>>>> Upload project, which is required by Tomahawk.
>>>>>>>>>>
>>>>>>>>>> -Matthias
>>>>>>>>>>
>>>>>>>>>> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <
>>>>>>>>>>
>>>>>>>>> v.kris21@gmail.com>
>>>>
>>>>>  wrote:
>>>>>>>>
>>>>>>>>>  A new development.  Now I am getting this error in the log:
>>>>>>>>>>> All I was getting before this is a popup error message.
>>>>>>>>>>> Now here is the stacktrace:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> SEVERE: Servlet.service() for servlet Faces Servlet threw
>>>>>>>>>>>
>>>>>>>>>> exception
>>>>>>
>>>>>>>
>>>>>>>>>>> java.lang.NoClassDefFoundError:
>>>>>>>>>>> org/apache/commons/fileupload/servlet/ServletFileUpload
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
>>>>
>>>>>    ExtensionsFilter.java:321*)
>>>>>>>>>>>
>>>>>>>>>>> *Thanks,*
>>>>>>>>>>> **
>>>>>>>>>>> *Veena*
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <
>>>>>>>>>>>
>>>>>>>>>> matzew@apache.org
>>>>>>>>
>>>>>>>>>  wrote:
>>>>>>>>>>>
>>>>>>>>>>> do you have a little bit more information ?
>>>>>>>>>>>>
>>>>>>>>>>>> cfg, size of the file. error message, stack trace...
>>>>>>>>>>>>
>>>>>>>>>>>> -Matthias
>>>>>>>>>>>>
>>>>>>>>>>>> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <
>>>>>>>>>>>>
>>>>>>>>>>> v.kris21@gmail.com
>>>>
>>>>>
>>>>>>>  wrote:
>>>>>>>>>>
>>>>>>>>>>>  Hi,
>>>>>>>>>>>>>
>>>>>>>>>>>>> I am having trouble making this work.  I have configured
>>>>>>>>>>>>>
>>>>>>>>>>>> the
>>>>
>>>>>  web.xml,
>>>>>>>>
>>>>>>>>>   faces-config.xml
>>>>>>>>>>>>> and followed the instructions on the following page:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
>>>>
>>>>>
>>>>>>>>>>>>> I get a following popup error:
>>>>>>>>>>>>> Message from webpage:
>>>>>>>>>>>>> A file upload error has occured, please verify your upload
>>>>>>>>>>>>>
>>>>>>>>>>>> data
>>>>
>>>>> and
>>>>>>
>>>>>>>  file
>>>>>>>>>>
>>>>>>>>>>>  name.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Veena
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Matthias Wessendorf
>>>>>>>>>>>>
>>>>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Matthias Wessendorf
>>>>>>>>>>
>>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Matthias Wessendorf
>>>>>>>>
>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>

Re: Trinidad file upload

Posted by veena pandit <v....@gmail.com>.
There doesn't seem to be an example of it on the web.
Not sure what goes in it.

Thanks,

Veena

On Wed, Nov 4, 2009 at 12:18 AM, Matthias Wessendorf <ma...@apache.org>wrote:

> On Wed, Nov 4, 2009 at 12:28 AM, veena pandit <v....@gmail.com> wrote:
> > I do not have a resource servlet.  But the tomahawk demo works without a
> > resource servlet.  I did have tr:document.  I removed it to see if it
> would
> > fix the error but it did not.
>
> if you would read the Trinidad doc, it says that the Resource Servlet
> is responsible
> to send down CSS/JS resources for Trinidad. Tomahawk has _nothing_ to do
> with
> that...
>
> Tomahawk just needs the Commons Upload JAR...
>
> >
> > Thanks,
> >
> > Veena
> >
> > On Tue, Nov 3, 2009 at 4:07 PM, Matthias Wessendorf
> > <mw...@gmail.com>wrote:
> >
> >> Do you have the Resource servlet? Are you having tr:document ?
> >>
> >> Sent from my iPod.
> >>
> >>
> >> On 03.11.2009, at 21:51, veena pandit <v....@gmail.com> wrote:
> >>
> >> Martin,
> >>>
> >>> Hi,  I tried a small demo app and I followed your instructions;  I get
> the
> >>> following errors:
> >>>
> >>> _submitFormCheck is not defined
> >>> http://localhost:8080/TrUpload/mypage.jsp line 34
> >>>
> >>> _checkLoad is not defined
> >>> http://localhost:8080/TrUpload/mypage.jsp line 1
> >>>
> >>> _submitForm is not defined
> >>> http://localhost:8080/TrUpload/mypage.jsp line 1.
> >>>
> >>> What am I doing wrong?
> >>>
> >>> Thanks,
> >>>
> >>> Veena
> >>>
> >>> On Tue, Nov 3, 2009 at 4:03 PM, Martin Kočí <Ma...@aura.cz>
> wrote:
> >>>
> >>> It seems that message "A file upload error has occurred, please verify
> >>>> your upload data and file name" occures on client and has nothing to
> do
> >>>> with server configuration. Can you please try  a simple example:
> >>>>
> >>>> <tr:form usesUpload="true">
> >>>> <tr:inputFile value="#{yourBean.uploadFile}" />
> >>>> </tr:form>
> >>>>
> >>>> if it works - if not please look in Firefox at "Tools" -> "Error
> >>>> Console" if there is any error.
> >>>>
> >>>>
> >>>> veena pandit píše v Út 03. 11. 2009 v 14:56 -0500:
> >>>>
> >>>>> Hi Martin,
> >>>>>
> >>>>> I checked my web.xml and the ordering is already the way you state it
> >>>>>
> >>>> should
> >>>>
> >>>>> be. Anything else I can check for?
> >>>>>
> >>>>> Thanks,
> >>>>>
> >>>>> Veena
> >>>>>
> >>>>> On Tue, Nov 3, 2009 at 3:24 PM, Martin Kočí <Ma...@aura.cz>
> >>>>> wrote:
> >>>>>
> >>>>> Hi,
> >>>>>>
> >>>>>> it is a known limitation, it depends on filters ordering in web.xml.
> >>>>>> .
> >>>>>> Look in your web.xml and put something like:
> >>>>>>
> >>>>>> <filter-mapping>
> >>>>>>  <filter-name>trinidad</filter-name>
> >>>>>>  <servlet-name>faces</servlet-name>
> >>>>>> </filter-mapping>
> >>>>>>
> >>>>>> before
> >>>>>>
> >>>>>> <filter-mapping>
> >>>>>>  <filter-name>MyFacesExtensionsFilter</filter-name>
> >>>>>>  <servlet-name>faces</servlet-name>
> >>>>>> </filter-mapping>
> >>>>>>
> >>>>>> Filter declared first will "consume" file upload.
> >>>>>>
> >>>>>>
> >>>>>> Regards,
> >>>>>>
> >>>>>> Martin
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> veena pandit píše v Út 03. 11. 2009 v 14:00 -0500:
> >>>>>>
> >>>>>>> I configured it according to the trinidad web page.
> >>>>>>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html
> >>>>>>>
> >>>>>>> Trinidad and Tomahawk are working well together.  I am using
> Trinidad
> >>>>>>>
> >>>>>> for
> >>>>
> >>>>> a
> >>>>>>
> >>>>>>> drop down and Tomahawk for file upload from BalusC's blog.  But I
> >>>>>>>
> >>>>>> just
> >>>>
> >>>>> added
> >>>>>>
> >>>>>>> the Trinidad File upload functionality to the web application and
> >>>>>>>
> >>>>>> that is
> >>>>
> >>>>>  the only thing that is not working.  I just thought I would use
> >>>>>>>
> >>>>>> Trinidad
> >>>>
> >>>>> for
> >>>>>>
> >>>>>>> both so I could have a common look and feel since this application
> >>>>>>>
> >>>>>> will
> >>>>
> >>>>> go
> >>>>>>
> >>>>>>> into production eventually.
> >>>>>>>
> >>>>>>> I could not find anything else specific to any problems with
> Trinidad
> >>>>>>>
> >>>>>> file
> >>>>>>
> >>>>>>> upload.
> >>>>>>>
> >>>>>>> Thanks.
> >>>>>>>
> >>>>>>> Veena
> >>>>>>>
> >>>>>>> On Tue, Nov 3, 2009 at 1:51 PM, Matthias Wessendorf <
> >>>>>>>
> >>>>>> matzew@apache.org
> >>>>
> >>>>>  wrote:
> >>>>>>>
> >>>>>>> are you sure that you have everything configured correct ?
> >>>>>>>>
> >>>>>>>> Trinidad and tomahawk ?
> >>>>>>>>
> >>>>>>>> I think i remember some issues on the upload case, when mixing
> them
> >>>>>>>> (trinidad and
> >>>>>>>> tomahawk). Perhaps searching the archives gives any hint ? I
> really
> >>>>>>>> don't remember it
> >>>>>>>>
> >>>>>>>> -Matthias
> >>>>>>>>
> >>>>>>>> On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com>
> >>>>>>>>
> >>>>>>> wrote:
> >>>>>>
> >>>>>>>  Well, I have both Tomahawk and trinidad in the same application
> >>>>>>>>>
> >>>>>>>> for
> >>>>
> >>>>> file
> >>>>>>
> >>>>>>>  uploads.
> >>>>>>>>> I added commons.io to the web-inf/lib directory and now I dont
> >>>>>>>>>
> >>>>>>>> get
> >>>>
> >>>>> any
> >>>>>>
> >>>>>>> error
> >>>>>>>>
> >>>>>>>>> messages in the log.  I just get the popup error message once
> >>>>>>>>>
> >>>>>>>> again.
> >>>>
> >>>>> I
> >>>>>>
> >>>>>>> am
> >>>>>>>>
> >>>>>>>>> using trinidad for another control in the same page.  But I was
> >>>>>>>>>
> >>>>>>>> also
> >>>>
> >>>>>  trying
> >>>>>>>>
> >>>>>>>>> to use trinidad for the upload as well.
> >>>>>>>>>
> >>>>>>>>> Thanks,
> >>>>>>>>>
> >>>>>>>>> Veena
> >>>>>>>>>
> >>>>>>>>> On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <
> >>>>>>>>>
> >>>>>>>> matzew@apache.org
> >>>>>>
> >>>>>>>  wrote:
> >>>>>>>>>
> >>>>>>>>> This is not Trinidad, this is Tomahawk.
> >>>>>>>>>>
> >>>>>>>>>> The "NoClassDefFoundError" says that you don't
> >>>>>>>>>> have the "ServletFileUpload" from the given package
> >>>>>>>>>> in your classpath. This class is part of the Apache Commons
> >>>>>>>>>> Upload project, which is required by Tomahawk.
> >>>>>>>>>>
> >>>>>>>>>> -Matthias
> >>>>>>>>>>
> >>>>>>>>>> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <
> >>>>>>>>>>
> >>>>>>>>> v.kris21@gmail.com>
> >>>>
> >>>>>  wrote:
> >>>>>>>>
> >>>>>>>>>  A new development.  Now I am getting this error in the log:
> >>>>>>>>>>> All I was getting before this is a popup error message.
> >>>>>>>>>>> Now here is the stacktrace:
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> SEVERE: Servlet.service() for servlet Faces Servlet threw
> >>>>>>>>>>>
> >>>>>>>>>> exception
> >>>>>>
> >>>>>>>
> >>>>>>>>>>> java.lang.NoClassDefFoundError:
> >>>>>>>>>>> org/apache/commons/fileupload/servlet/ServletFileUpload
> >>>>>>>>>>>
> >>>>>>>>>>> at
> >>>>>>>>>>>
> >>>>>>>>>> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
> >>>>
> >>>>>    ExtensionsFilter.java:321*)
> >>>>>>>>>>>
> >>>>>>>>>>> *Thanks,*
> >>>>>>>>>>> **
> >>>>>>>>>>> *Veena*
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <
> >>>>>>>>>>>
> >>>>>>>>>> matzew@apache.org
> >>>>>>>>
> >>>>>>>>>  wrote:
> >>>>>>>>>>>
> >>>>>>>>>>> do you have a little bit more information ?
> >>>>>>>>>>>>
> >>>>>>>>>>>> cfg, size of the file. error message, stack trace...
> >>>>>>>>>>>>
> >>>>>>>>>>>> -Matthias
> >>>>>>>>>>>>
> >>>>>>>>>>>> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <
> >>>>>>>>>>>>
> >>>>>>>>>>> v.kris21@gmail.com
> >>>>
> >>>>>
> >>>>>>>  wrote:
> >>>>>>>>>>
> >>>>>>>>>>>  Hi,
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> I am having trouble making this work.  I have configured
> >>>>>>>>>>>>>
> >>>>>>>>>>>> the
> >>>>
> >>>>>  web.xml,
> >>>>>>>>
> >>>>>>>>>   faces-config.xml
> >>>>>>>>>>>>> and followed the instructions on the following page:
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
> >>>>
> >>>>>
> >>>>>>>>>>>>> I get a following popup error:
> >>>>>>>>>>>>> Message from webpage:
> >>>>>>>>>>>>> A file upload error has occured, please verify your upload
> >>>>>>>>>>>>>
> >>>>>>>>>>>> data
> >>>>
> >>>>> and
> >>>>>>
> >>>>>>>  file
> >>>>>>>>>>
> >>>>>>>>>>>  name.
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> Thanks,
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> Veena
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> --
> >>>>>>>>>>>> Matthias Wessendorf
> >>>>>>>>>>>>
> >>>>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
> >>>>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
> >>>>>>>>>>>> twitter: http://twitter.com/mwessendorf
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> --
> >>>>>>>>>> Matthias Wessendorf
> >>>>>>>>>>
> >>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
> >>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
> >>>>>>>>>> twitter: http://twitter.com/mwessendorf
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>> Matthias Wessendorf
> >>>>>>>>
> >>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
> >>>>>>>> sessions: http://www.slideshare.net/mwessendorf
> >>>>>>>> twitter: http://twitter.com/mwessendorf
> >>>>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >
>
>
>
> --
>  Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>

Re: Trinidad file upload

Posted by veena pandit <v....@gmail.com>.
I just checked.  It was in my eclipse build path, but was missing from the
web-inf/lib.  But I added it there,redeployed it and tested it I am still
getting the errors in the Firefox console.

It must be something with the configuration.

Thanks,

Veena

On Tue, Nov 3, 2009 at 6:56 PM, Richard Yee <ri...@gmail.com> wrote:

> Did you add the Commons FileUpload.jar to your WEB-INF/lib directory?
>
> -Richard
>
>
> On Tue, Nov 3, 2009 at 3:28 PM, veena pandit <v....@gmail.com> wrote:
> > I do not have a resource servlet.  But the tomahawk demo works without a
> > resource servlet.  I did have tr:document.  I removed it to see if it
> would
> > fix the error but it did not.
> >
> > Thanks,
> >
> > Veena
> >
> > On Tue, Nov 3, 2009 at 4:07 PM, Matthias Wessendorf
> > <mw...@gmail.com>wrote:
> >
> >> Do you have the Resource servlet? Are you having tr:document ?
> >>
> >> Sent from my iPod.
> >>
> >>
> >> On 03.11.2009, at 21:51, veena pandit <v....@gmail.com> wrote:
> >>
> >> Martin,
> >>>
> >>> Hi,  I tried a small demo app and I followed your instructions;  I get
> the
> >>> following errors:
> >>>
> >>> _submitFormCheck is not defined
> >>> http://localhost:8080/TrUpload/mypage.jsp line 34
> >>>
> >>> _checkLoad is not defined
> >>> http://localhost:8080/TrUpload/mypage.jsp line 1
> >>>
> >>> _submitForm is not defined
> >>> http://localhost:8080/TrUpload/mypage.jsp line 1.
> >>>
> >>> What am I doing wrong?
> >>>
> >>> Thanks,
> >>>
> >>> Veena
> >>>
> >>> On Tue, Nov 3, 2009 at 4:03 PM, Martin Kočí <Ma...@aura.cz>
> wrote:
> >>>
> >>> It seems that message "A file upload error has occurred, please verify
> >>>> your upload data and file name" occures on client and has nothing to
> do
> >>>> with server configuration. Can you please try  a simple example:
> >>>>
> >>>> <tr:form usesUpload="true">
> >>>> <tr:inputFile value="#{yourBean.uploadFile}" />
> >>>> </tr:form>
> >>>>
> >>>> if it works - if not please look in Firefox at "Tools" -> "Error
> >>>> Console" if there is any error.
> >>>>
> >>>>
> >>>> veena pandit píše v Út 03. 11. 2009 v 14:56 -0500:
> >>>>
> >>>>> Hi Martin,
> >>>>>
> >>>>> I checked my web.xml and the ordering is already the way you state it
> >>>>>
> >>>> should
> >>>>
> >>>>> be. Anything else I can check for?
> >>>>>
> >>>>> Thanks,
> >>>>>
> >>>>> Veena
> >>>>>
> >>>>> On Tue, Nov 3, 2009 at 3:24 PM, Martin Kočí <Ma...@aura.cz>
> >>>>> wrote:
> >>>>>
> >>>>> Hi,
> >>>>>>
> >>>>>> it is a known limitation, it depends on filters ordering in web.xml.
> >>>>>> .
> >>>>>> Look in your web.xml and put something like:
> >>>>>>
> >>>>>> <filter-mapping>
> >>>>>>  <filter-name>trinidad</filter-name>
> >>>>>>  <servlet-name>faces</servlet-name>
> >>>>>> </filter-mapping>
> >>>>>>
> >>>>>> before
> >>>>>>
> >>>>>> <filter-mapping>
> >>>>>>  <filter-name>MyFacesExtensionsFilter</filter-name>
> >>>>>>  <servlet-name>faces</servlet-name>
> >>>>>> </filter-mapping>
> >>>>>>
> >>>>>> Filter declared first will "consume" file upload.
> >>>>>>
> >>>>>>
> >>>>>> Regards,
> >>>>>>
> >>>>>> Martin
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> veena pandit píše v Út 03. 11. 2009 v 14:00 -0500:
> >>>>>>
> >>>>>>> I configured it according to the trinidad web page.
> >>>>>>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html
> >>>>>>>
> >>>>>>> Trinidad and Tomahawk are working well together.  I am using
> Trinidad
> >>>>>>>
> >>>>>> for
> >>>>
> >>>>> a
> >>>>>>
> >>>>>>> drop down and Tomahawk for file upload from BalusC's blog.  But I
> >>>>>>>
> >>>>>> just
> >>>>
> >>>>> added
> >>>>>>
> >>>>>>> the Trinidad File upload functionality to the web application and
> >>>>>>>
> >>>>>> that is
> >>>>
> >>>>>  the only thing that is not working.  I just thought I would use
> >>>>>>>
> >>>>>> Trinidad
> >>>>
> >>>>> for
> >>>>>>
> >>>>>>> both so I could have a common look and feel since this application
> >>>>>>>
> >>>>>> will
> >>>>
> >>>>> go
> >>>>>>
> >>>>>>> into production eventually.
> >>>>>>>
> >>>>>>> I could not find anything else specific to any problems with
> Trinidad
> >>>>>>>
> >>>>>> file
> >>>>>>
> >>>>>>> upload.
> >>>>>>>
> >>>>>>> Thanks.
> >>>>>>>
> >>>>>>> Veena
> >>>>>>>
> >>>>>>> On Tue, Nov 3, 2009 at 1:51 PM, Matthias Wessendorf <
> >>>>>>>
> >>>>>> matzew@apache.org
> >>>>
> >>>>>  wrote:
> >>>>>>>
> >>>>>>> are you sure that you have everything configured correct ?
> >>>>>>>>
> >>>>>>>> Trinidad and tomahawk ?
> >>>>>>>>
> >>>>>>>> I think i remember some issues on the upload case, when mixing
> them
> >>>>>>>> (trinidad and
> >>>>>>>> tomahawk). Perhaps searching the archives gives any hint ? I
> really
> >>>>>>>> don't remember it
> >>>>>>>>
> >>>>>>>> -Matthias
> >>>>>>>>
> >>>>>>>> On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com>
> >>>>>>>>
> >>>>>>> wrote:
> >>>>>>
> >>>>>>>  Well, I have both Tomahawk and trinidad in the same application
> >>>>>>>>>
> >>>>>>>> for
> >>>>
> >>>>> file
> >>>>>>
> >>>>>>>  uploads.
> >>>>>>>>> I added commons.io to the web-inf/lib directory and now I dont
> >>>>>>>>>
> >>>>>>>> get
> >>>>
> >>>>> any
> >>>>>>
> >>>>>>> error
> >>>>>>>>
> >>>>>>>>> messages in the log.  I just get the popup error message once
> >>>>>>>>>
> >>>>>>>> again.
> >>>>
> >>>>> I
> >>>>>>
> >>>>>>> am
> >>>>>>>>
> >>>>>>>>> using trinidad for another control in the same page.  But I was
> >>>>>>>>>
> >>>>>>>> also
> >>>>
> >>>>>  trying
> >>>>>>>>
> >>>>>>>>> to use trinidad for the upload as well.
> >>>>>>>>>
> >>>>>>>>> Thanks,
> >>>>>>>>>
> >>>>>>>>> Veena
> >>>>>>>>>
> >>>>>>>>> On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <
> >>>>>>>>>
> >>>>>>>> matzew@apache.org
> >>>>>>
> >>>>>>>  wrote:
> >>>>>>>>>
> >>>>>>>>> This is not Trinidad, this is Tomahawk.
> >>>>>>>>>>
> >>>>>>>>>> The "NoClassDefFoundError" says that you don't
> >>>>>>>>>> have the "ServletFileUpload" from the given package
> >>>>>>>>>> in your classpath. This class is part of the Apache Commons
> >>>>>>>>>> Upload project, which is required by Tomahawk.
> >>>>>>>>>>
> >>>>>>>>>> -Matthias
> >>>>>>>>>>
> >>>>>>>>>> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <
> >>>>>>>>>>
> >>>>>>>>> v.kris21@gmail.com>
> >>>>
> >>>>>  wrote:
> >>>>>>>>
> >>>>>>>>>  A new development.  Now I am getting this error in the log:
> >>>>>>>>>>> All I was getting before this is a popup error message.
> >>>>>>>>>>> Now here is the stacktrace:
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> SEVERE: Servlet.service() for servlet Faces Servlet threw
> >>>>>>>>>>>
> >>>>>>>>>> exception
> >>>>>>
> >>>>>>>
> >>>>>>>>>>> java.lang.NoClassDefFoundError:
> >>>>>>>>>>> org/apache/commons/fileupload/servlet/ServletFileUpload
> >>>>>>>>>>>
> >>>>>>>>>>> at
> >>>>>>>>>>>
> >>>>>>>>>> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
> >>>>
> >>>>>    ExtensionsFilter.java:321*)
> >>>>>>>>>>>
> >>>>>>>>>>> *Thanks,*
> >>>>>>>>>>> **
> >>>>>>>>>>> *Veena*
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <
> >>>>>>>>>>>
> >>>>>>>>>> matzew@apache.org
> >>>>>>>>
> >>>>>>>>>  wrote:
> >>>>>>>>>>>
> >>>>>>>>>>> do you have a little bit more information ?
> >>>>>>>>>>>>
> >>>>>>>>>>>> cfg, size of the file. error message, stack trace...
> >>>>>>>>>>>>
> >>>>>>>>>>>> -Matthias
> >>>>>>>>>>>>
> >>>>>>>>>>>> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <
> >>>>>>>>>>>>
> >>>>>>>>>>> v.kris21@gmail.com
> >>>>
> >>>>>
> >>>>>>>  wrote:
> >>>>>>>>>>
> >>>>>>>>>>>  Hi,
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> I am having trouble making this work.  I have configured
> >>>>>>>>>>>>>
> >>>>>>>>>>>> the
> >>>>
> >>>>>  web.xml,
> >>>>>>>>
> >>>>>>>>>   faces-config.xml
> >>>>>>>>>>>>> and followed the instructions on the following page:
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
> >>>>
> >>>>>
> >>>>>>>>>>>>> I get a following popup error:
> >>>>>>>>>>>>> Message from webpage:
> >>>>>>>>>>>>> A file upload error has occured, please verify your upload
> >>>>>>>>>>>>>
> >>>>>>>>>>>> data
> >>>>
> >>>>> and
> >>>>>>
> >>>>>>>  file
> >>>>>>>>>>
> >>>>>>>>>>>  name.
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> Thanks,
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> Veena
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> --
> >>>>>>>>>>>> Matthias Wessendorf
> >>>>>>>>>>>>
> >>>>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
> >>>>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
> >>>>>>>>>>>> twitter: http://twitter.com/mwessendorf
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> --
> >>>>>>>>>> Matthias Wessendorf
> >>>>>>>>>>
> >>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
> >>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
> >>>>>>>>>> twitter: http://twitter.com/mwessendorf
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>> Matthias Wessendorf
> >>>>>>>>
> >>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
> >>>>>>>> sessions: http://www.slideshare.net/mwessendorf
> >>>>>>>> twitter: http://twitter.com/mwessendorf
> >>>>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >
>

Re: Trinidad file upload

Posted by Richard Yee <ri...@gmail.com>.
Did you add the Commons FileUpload.jar to your WEB-INF/lib directory?

-Richard


On Tue, Nov 3, 2009 at 3:28 PM, veena pandit <v....@gmail.com> wrote:
> I do not have a resource servlet.  But the tomahawk demo works without a
> resource servlet.  I did have tr:document.  I removed it to see if it would
> fix the error but it did not.
>
> Thanks,
>
> Veena
>
> On Tue, Nov 3, 2009 at 4:07 PM, Matthias Wessendorf
> <mw...@gmail.com>wrote:
>
>> Do you have the Resource servlet? Are you having tr:document ?
>>
>> Sent from my iPod.
>>
>>
>> On 03.11.2009, at 21:51, veena pandit <v....@gmail.com> wrote:
>>
>> Martin,
>>>
>>> Hi,  I tried a small demo app and I followed your instructions;  I get the
>>> following errors:
>>>
>>> _submitFormCheck is not defined
>>> http://localhost:8080/TrUpload/mypage.jsp line 34
>>>
>>> _checkLoad is not defined
>>> http://localhost:8080/TrUpload/mypage.jsp line 1
>>>
>>> _submitForm is not defined
>>> http://localhost:8080/TrUpload/mypage.jsp line 1.
>>>
>>> What am I doing wrong?
>>>
>>> Thanks,
>>>
>>> Veena
>>>
>>> On Tue, Nov 3, 2009 at 4:03 PM, Martin Kočí <Ma...@aura.cz> wrote:
>>>
>>> It seems that message "A file upload error has occurred, please verify
>>>> your upload data and file name" occures on client and has nothing to do
>>>> with server configuration. Can you please try  a simple example:
>>>>
>>>> <tr:form usesUpload="true">
>>>> <tr:inputFile value="#{yourBean.uploadFile}" />
>>>> </tr:form>
>>>>
>>>> if it works - if not please look in Firefox at "Tools" -> "Error
>>>> Console" if there is any error.
>>>>
>>>>
>>>> veena pandit píše v Út 03. 11. 2009 v 14:56 -0500:
>>>>
>>>>> Hi Martin,
>>>>>
>>>>> I checked my web.xml and the ordering is already the way you state it
>>>>>
>>>> should
>>>>
>>>>> be. Anything else I can check for?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Veena
>>>>>
>>>>> On Tue, Nov 3, 2009 at 3:24 PM, Martin Kočí <Ma...@aura.cz>
>>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>>
>>>>>> it is a known limitation, it depends on filters ordering in web.xml.
>>>>>> .
>>>>>> Look in your web.xml and put something like:
>>>>>>
>>>>>> <filter-mapping>
>>>>>>  <filter-name>trinidad</filter-name>
>>>>>>  <servlet-name>faces</servlet-name>
>>>>>> </filter-mapping>
>>>>>>
>>>>>> before
>>>>>>
>>>>>> <filter-mapping>
>>>>>>  <filter-name>MyFacesExtensionsFilter</filter-name>
>>>>>>  <servlet-name>faces</servlet-name>
>>>>>> </filter-mapping>
>>>>>>
>>>>>> Filter declared first will "consume" file upload.
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Martin
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> veena pandit píše v Út 03. 11. 2009 v 14:00 -0500:
>>>>>>
>>>>>>> I configured it according to the trinidad web page.
>>>>>>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html
>>>>>>>
>>>>>>> Trinidad and Tomahawk are working well together.  I am using Trinidad
>>>>>>>
>>>>>> for
>>>>
>>>>> a
>>>>>>
>>>>>>> drop down and Tomahawk for file upload from BalusC's blog.  But I
>>>>>>>
>>>>>> just
>>>>
>>>>> added
>>>>>>
>>>>>>> the Trinidad File upload functionality to the web application and
>>>>>>>
>>>>>> that is
>>>>
>>>>>  the only thing that is not working.  I just thought I would use
>>>>>>>
>>>>>> Trinidad
>>>>
>>>>> for
>>>>>>
>>>>>>> both so I could have a common look and feel since this application
>>>>>>>
>>>>>> will
>>>>
>>>>> go
>>>>>>
>>>>>>> into production eventually.
>>>>>>>
>>>>>>> I could not find anything else specific to any problems with Trinidad
>>>>>>>
>>>>>> file
>>>>>>
>>>>>>> upload.
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>> Veena
>>>>>>>
>>>>>>> On Tue, Nov 3, 2009 at 1:51 PM, Matthias Wessendorf <
>>>>>>>
>>>>>> matzew@apache.org
>>>>
>>>>>  wrote:
>>>>>>>
>>>>>>> are you sure that you have everything configured correct ?
>>>>>>>>
>>>>>>>> Trinidad and tomahawk ?
>>>>>>>>
>>>>>>>> I think i remember some issues on the upload case, when mixing them
>>>>>>>> (trinidad and
>>>>>>>> tomahawk). Perhaps searching the archives gives any hint ? I really
>>>>>>>> don't remember it
>>>>>>>>
>>>>>>>> -Matthias
>>>>>>>>
>>>>>>>> On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com>
>>>>>>>>
>>>>>>> wrote:
>>>>>>
>>>>>>>  Well, I have both Tomahawk and trinidad in the same application
>>>>>>>>>
>>>>>>>> for
>>>>
>>>>> file
>>>>>>
>>>>>>>  uploads.
>>>>>>>>> I added commons.io to the web-inf/lib directory and now I dont
>>>>>>>>>
>>>>>>>> get
>>>>
>>>>> any
>>>>>>
>>>>>>> error
>>>>>>>>
>>>>>>>>> messages in the log.  I just get the popup error message once
>>>>>>>>>
>>>>>>>> again.
>>>>
>>>>> I
>>>>>>
>>>>>>> am
>>>>>>>>
>>>>>>>>> using trinidad for another control in the same page.  But I was
>>>>>>>>>
>>>>>>>> also
>>>>
>>>>>  trying
>>>>>>>>
>>>>>>>>> to use trinidad for the upload as well.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> Veena
>>>>>>>>>
>>>>>>>>> On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <
>>>>>>>>>
>>>>>>>> matzew@apache.org
>>>>>>
>>>>>>>  wrote:
>>>>>>>>>
>>>>>>>>> This is not Trinidad, this is Tomahawk.
>>>>>>>>>>
>>>>>>>>>> The "NoClassDefFoundError" says that you don't
>>>>>>>>>> have the "ServletFileUpload" from the given package
>>>>>>>>>> in your classpath. This class is part of the Apache Commons
>>>>>>>>>> Upload project, which is required by Tomahawk.
>>>>>>>>>>
>>>>>>>>>> -Matthias
>>>>>>>>>>
>>>>>>>>>> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <
>>>>>>>>>>
>>>>>>>>> v.kris21@gmail.com>
>>>>
>>>>>  wrote:
>>>>>>>>
>>>>>>>>>  A new development.  Now I am getting this error in the log:
>>>>>>>>>>> All I was getting before this is a popup error message.
>>>>>>>>>>> Now here is the stacktrace:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> SEVERE: Servlet.service() for servlet Faces Servlet threw
>>>>>>>>>>>
>>>>>>>>>> exception
>>>>>>
>>>>>>>
>>>>>>>>>>> java.lang.NoClassDefFoundError:
>>>>>>>>>>> org/apache/commons/fileupload/servlet/ServletFileUpload
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
>>>>
>>>>>    ExtensionsFilter.java:321*)
>>>>>>>>>>>
>>>>>>>>>>> *Thanks,*
>>>>>>>>>>> **
>>>>>>>>>>> *Veena*
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <
>>>>>>>>>>>
>>>>>>>>>> matzew@apache.org
>>>>>>>>
>>>>>>>>>  wrote:
>>>>>>>>>>>
>>>>>>>>>>> do you have a little bit more information ?
>>>>>>>>>>>>
>>>>>>>>>>>> cfg, size of the file. error message, stack trace...
>>>>>>>>>>>>
>>>>>>>>>>>> -Matthias
>>>>>>>>>>>>
>>>>>>>>>>>> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <
>>>>>>>>>>>>
>>>>>>>>>>> v.kris21@gmail.com
>>>>
>>>>>
>>>>>>>  wrote:
>>>>>>>>>>
>>>>>>>>>>>  Hi,
>>>>>>>>>>>>>
>>>>>>>>>>>>> I am having trouble making this work.  I have configured
>>>>>>>>>>>>>
>>>>>>>>>>>> the
>>>>
>>>>>  web.xml,
>>>>>>>>
>>>>>>>>>   faces-config.xml
>>>>>>>>>>>>> and followed the instructions on the following page:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
>>>>
>>>>>
>>>>>>>>>>>>> I get a following popup error:
>>>>>>>>>>>>> Message from webpage:
>>>>>>>>>>>>> A file upload error has occured, please verify your upload
>>>>>>>>>>>>>
>>>>>>>>>>>> data
>>>>
>>>>> and
>>>>>>
>>>>>>>  file
>>>>>>>>>>
>>>>>>>>>>>  name.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Veena
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Matthias Wessendorf
>>>>>>>>>>>>
>>>>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Matthias Wessendorf
>>>>>>>>>>
>>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Matthias Wessendorf
>>>>>>>>
>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>

Re: Trinidad file upload

Posted by Matthias Wessendorf <ma...@apache.org>.
On Wed, Nov 4, 2009 at 12:28 AM, veena pandit <v....@gmail.com> wrote:
> I do not have a resource servlet.  But the tomahawk demo works without a
> resource servlet.  I did have tr:document.  I removed it to see if it would
> fix the error but it did not.

if you would read the Trinidad doc, it says that the Resource Servlet
is responsible
to send down CSS/JS resources for Trinidad. Tomahawk has _nothing_ to do with
that...

Tomahawk just needs the Commons Upload JAR...

>
> Thanks,
>
> Veena
>
> On Tue, Nov 3, 2009 at 4:07 PM, Matthias Wessendorf
> <mw...@gmail.com>wrote:
>
>> Do you have the Resource servlet? Are you having tr:document ?
>>
>> Sent from my iPod.
>>
>>
>> On 03.11.2009, at 21:51, veena pandit <v....@gmail.com> wrote:
>>
>> Martin,
>>>
>>> Hi,  I tried a small demo app and I followed your instructions;  I get the
>>> following errors:
>>>
>>> _submitFormCheck is not defined
>>> http://localhost:8080/TrUpload/mypage.jsp line 34
>>>
>>> _checkLoad is not defined
>>> http://localhost:8080/TrUpload/mypage.jsp line 1
>>>
>>> _submitForm is not defined
>>> http://localhost:8080/TrUpload/mypage.jsp line 1.
>>>
>>> What am I doing wrong?
>>>
>>> Thanks,
>>>
>>> Veena
>>>
>>> On Tue, Nov 3, 2009 at 4:03 PM, Martin Kočí <Ma...@aura.cz> wrote:
>>>
>>> It seems that message "A file upload error has occurred, please verify
>>>> your upload data and file name" occures on client and has nothing to do
>>>> with server configuration. Can you please try  a simple example:
>>>>
>>>> <tr:form usesUpload="true">
>>>> <tr:inputFile value="#{yourBean.uploadFile}" />
>>>> </tr:form>
>>>>
>>>> if it works - if not please look in Firefox at "Tools" -> "Error
>>>> Console" if there is any error.
>>>>
>>>>
>>>> veena pandit píše v Út 03. 11. 2009 v 14:56 -0500:
>>>>
>>>>> Hi Martin,
>>>>>
>>>>> I checked my web.xml and the ordering is already the way you state it
>>>>>
>>>> should
>>>>
>>>>> be. Anything else I can check for?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Veena
>>>>>
>>>>> On Tue, Nov 3, 2009 at 3:24 PM, Martin Kočí <Ma...@aura.cz>
>>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>>
>>>>>> it is a known limitation, it depends on filters ordering in web.xml.
>>>>>> .
>>>>>> Look in your web.xml and put something like:
>>>>>>
>>>>>> <filter-mapping>
>>>>>>  <filter-name>trinidad</filter-name>
>>>>>>  <servlet-name>faces</servlet-name>
>>>>>> </filter-mapping>
>>>>>>
>>>>>> before
>>>>>>
>>>>>> <filter-mapping>
>>>>>>  <filter-name>MyFacesExtensionsFilter</filter-name>
>>>>>>  <servlet-name>faces</servlet-name>
>>>>>> </filter-mapping>
>>>>>>
>>>>>> Filter declared first will "consume" file upload.
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Martin
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> veena pandit píše v Út 03. 11. 2009 v 14:00 -0500:
>>>>>>
>>>>>>> I configured it according to the trinidad web page.
>>>>>>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html
>>>>>>>
>>>>>>> Trinidad and Tomahawk are working well together.  I am using Trinidad
>>>>>>>
>>>>>> for
>>>>
>>>>> a
>>>>>>
>>>>>>> drop down and Tomahawk for file upload from BalusC's blog.  But I
>>>>>>>
>>>>>> just
>>>>
>>>>> added
>>>>>>
>>>>>>> the Trinidad File upload functionality to the web application and
>>>>>>>
>>>>>> that is
>>>>
>>>>>  the only thing that is not working.  I just thought I would use
>>>>>>>
>>>>>> Trinidad
>>>>
>>>>> for
>>>>>>
>>>>>>> both so I could have a common look and feel since this application
>>>>>>>
>>>>>> will
>>>>
>>>>> go
>>>>>>
>>>>>>> into production eventually.
>>>>>>>
>>>>>>> I could not find anything else specific to any problems with Trinidad
>>>>>>>
>>>>>> file
>>>>>>
>>>>>>> upload.
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>> Veena
>>>>>>>
>>>>>>> On Tue, Nov 3, 2009 at 1:51 PM, Matthias Wessendorf <
>>>>>>>
>>>>>> matzew@apache.org
>>>>
>>>>>  wrote:
>>>>>>>
>>>>>>> are you sure that you have everything configured correct ?
>>>>>>>>
>>>>>>>> Trinidad and tomahawk ?
>>>>>>>>
>>>>>>>> I think i remember some issues on the upload case, when mixing them
>>>>>>>> (trinidad and
>>>>>>>> tomahawk). Perhaps searching the archives gives any hint ? I really
>>>>>>>> don't remember it
>>>>>>>>
>>>>>>>> -Matthias
>>>>>>>>
>>>>>>>> On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com>
>>>>>>>>
>>>>>>> wrote:
>>>>>>
>>>>>>>  Well, I have both Tomahawk and trinidad in the same application
>>>>>>>>>
>>>>>>>> for
>>>>
>>>>> file
>>>>>>
>>>>>>>  uploads.
>>>>>>>>> I added commons.io to the web-inf/lib directory and now I dont
>>>>>>>>>
>>>>>>>> get
>>>>
>>>>> any
>>>>>>
>>>>>>> error
>>>>>>>>
>>>>>>>>> messages in the log.  I just get the popup error message once
>>>>>>>>>
>>>>>>>> again.
>>>>
>>>>> I
>>>>>>
>>>>>>> am
>>>>>>>>
>>>>>>>>> using trinidad for another control in the same page.  But I was
>>>>>>>>>
>>>>>>>> also
>>>>
>>>>>  trying
>>>>>>>>
>>>>>>>>> to use trinidad for the upload as well.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> Veena
>>>>>>>>>
>>>>>>>>> On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <
>>>>>>>>>
>>>>>>>> matzew@apache.org
>>>>>>
>>>>>>>  wrote:
>>>>>>>>>
>>>>>>>>> This is not Trinidad, this is Tomahawk.
>>>>>>>>>>
>>>>>>>>>> The "NoClassDefFoundError" says that you don't
>>>>>>>>>> have the "ServletFileUpload" from the given package
>>>>>>>>>> in your classpath. This class is part of the Apache Commons
>>>>>>>>>> Upload project, which is required by Tomahawk.
>>>>>>>>>>
>>>>>>>>>> -Matthias
>>>>>>>>>>
>>>>>>>>>> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <
>>>>>>>>>>
>>>>>>>>> v.kris21@gmail.com>
>>>>
>>>>>  wrote:
>>>>>>>>
>>>>>>>>>  A new development.  Now I am getting this error in the log:
>>>>>>>>>>> All I was getting before this is a popup error message.
>>>>>>>>>>> Now here is the stacktrace:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> SEVERE: Servlet.service() for servlet Faces Servlet threw
>>>>>>>>>>>
>>>>>>>>>> exception
>>>>>>
>>>>>>>
>>>>>>>>>>> java.lang.NoClassDefFoundError:
>>>>>>>>>>> org/apache/commons/fileupload/servlet/ServletFileUpload
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
>>>>
>>>>>    ExtensionsFilter.java:321*)
>>>>>>>>>>>
>>>>>>>>>>> *Thanks,*
>>>>>>>>>>> **
>>>>>>>>>>> *Veena*
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <
>>>>>>>>>>>
>>>>>>>>>> matzew@apache.org
>>>>>>>>
>>>>>>>>>  wrote:
>>>>>>>>>>>
>>>>>>>>>>> do you have a little bit more information ?
>>>>>>>>>>>>
>>>>>>>>>>>> cfg, size of the file. error message, stack trace...
>>>>>>>>>>>>
>>>>>>>>>>>> -Matthias
>>>>>>>>>>>>
>>>>>>>>>>>> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <
>>>>>>>>>>>>
>>>>>>>>>>> v.kris21@gmail.com
>>>>
>>>>>
>>>>>>>  wrote:
>>>>>>>>>>
>>>>>>>>>>>  Hi,
>>>>>>>>>>>>>
>>>>>>>>>>>>> I am having trouble making this work.  I have configured
>>>>>>>>>>>>>
>>>>>>>>>>>> the
>>>>
>>>>>  web.xml,
>>>>>>>>
>>>>>>>>>   faces-config.xml
>>>>>>>>>>>>> and followed the instructions on the following page:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
>>>>
>>>>>
>>>>>>>>>>>>> I get a following popup error:
>>>>>>>>>>>>> Message from webpage:
>>>>>>>>>>>>> A file upload error has occured, please verify your upload
>>>>>>>>>>>>>
>>>>>>>>>>>> data
>>>>
>>>>> and
>>>>>>
>>>>>>>  file
>>>>>>>>>>
>>>>>>>>>>>  name.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Veena
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Matthias Wessendorf
>>>>>>>>>>>>
>>>>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Matthias Wessendorf
>>>>>>>>>>
>>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Matthias Wessendorf
>>>>>>>>
>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Re: Trinidad file upload

Posted by veena pandit <v....@gmail.com>.
I do not have a resource servlet.  But the tomahawk demo works without a
resource servlet.  I did have tr:document.  I removed it to see if it would
fix the error but it did not.

Thanks,

Veena

On Tue, Nov 3, 2009 at 4:07 PM, Matthias Wessendorf
<mw...@gmail.com>wrote:

> Do you have the Resource servlet? Are you having tr:document ?
>
> Sent from my iPod.
>
>
> On 03.11.2009, at 21:51, veena pandit <v....@gmail.com> wrote:
>
> Martin,
>>
>> Hi,  I tried a small demo app and I followed your instructions;  I get the
>> following errors:
>>
>> _submitFormCheck is not defined
>> http://localhost:8080/TrUpload/mypage.jsp line 34
>>
>> _checkLoad is not defined
>> http://localhost:8080/TrUpload/mypage.jsp line 1
>>
>> _submitForm is not defined
>> http://localhost:8080/TrUpload/mypage.jsp line 1.
>>
>> What am I doing wrong?
>>
>> Thanks,
>>
>> Veena
>>
>> On Tue, Nov 3, 2009 at 4:03 PM, Martin Kočí <Ma...@aura.cz> wrote:
>>
>> It seems that message "A file upload error has occurred, please verify
>>> your upload data and file name" occures on client and has nothing to do
>>> with server configuration. Can you please try  a simple example:
>>>
>>> <tr:form usesUpload="true">
>>> <tr:inputFile value="#{yourBean.uploadFile}" />
>>> </tr:form>
>>>
>>> if it works - if not please look in Firefox at "Tools" -> "Error
>>> Console" if there is any error.
>>>
>>>
>>> veena pandit píše v Út 03. 11. 2009 v 14:56 -0500:
>>>
>>>> Hi Martin,
>>>>
>>>> I checked my web.xml and the ordering is already the way you state it
>>>>
>>> should
>>>
>>>> be. Anything else I can check for?
>>>>
>>>> Thanks,
>>>>
>>>> Veena
>>>>
>>>> On Tue, Nov 3, 2009 at 3:24 PM, Martin Kočí <Ma...@aura.cz>
>>>> wrote:
>>>>
>>>> Hi,
>>>>>
>>>>> it is a known limitation, it depends on filters ordering in web.xml.
>>>>> .
>>>>> Look in your web.xml and put something like:
>>>>>
>>>>> <filter-mapping>
>>>>>  <filter-name>trinidad</filter-name>
>>>>>  <servlet-name>faces</servlet-name>
>>>>> </filter-mapping>
>>>>>
>>>>> before
>>>>>
>>>>> <filter-mapping>
>>>>>  <filter-name>MyFacesExtensionsFilter</filter-name>
>>>>>  <servlet-name>faces</servlet-name>
>>>>> </filter-mapping>
>>>>>
>>>>> Filter declared first will "consume" file upload.
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>> Martin
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> veena pandit píše v Út 03. 11. 2009 v 14:00 -0500:
>>>>>
>>>>>> I configured it according to the trinidad web page.
>>>>>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html
>>>>>>
>>>>>> Trinidad and Tomahawk are working well together.  I am using Trinidad
>>>>>>
>>>>> for
>>>
>>>> a
>>>>>
>>>>>> drop down and Tomahawk for file upload from BalusC's blog.  But I
>>>>>>
>>>>> just
>>>
>>>> added
>>>>>
>>>>>> the Trinidad File upload functionality to the web application and
>>>>>>
>>>>> that is
>>>
>>>>  the only thing that is not working.  I just thought I would use
>>>>>>
>>>>> Trinidad
>>>
>>>> for
>>>>>
>>>>>> both so I could have a common look and feel since this application
>>>>>>
>>>>> will
>>>
>>>> go
>>>>>
>>>>>> into production eventually.
>>>>>>
>>>>>> I could not find anything else specific to any problems with Trinidad
>>>>>>
>>>>> file
>>>>>
>>>>>> upload.
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> Veena
>>>>>>
>>>>>> On Tue, Nov 3, 2009 at 1:51 PM, Matthias Wessendorf <
>>>>>>
>>>>> matzew@apache.org
>>>
>>>>  wrote:
>>>>>>
>>>>>> are you sure that you have everything configured correct ?
>>>>>>>
>>>>>>> Trinidad and tomahawk ?
>>>>>>>
>>>>>>> I think i remember some issues on the upload case, when mixing them
>>>>>>> (trinidad and
>>>>>>> tomahawk). Perhaps searching the archives gives any hint ? I really
>>>>>>> don't remember it
>>>>>>>
>>>>>>> -Matthias
>>>>>>>
>>>>>>> On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com>
>>>>>>>
>>>>>> wrote:
>>>>>
>>>>>>  Well, I have both Tomahawk and trinidad in the same application
>>>>>>>>
>>>>>>> for
>>>
>>>> file
>>>>>
>>>>>>  uploads.
>>>>>>>> I added commons.io to the web-inf/lib directory and now I dont
>>>>>>>>
>>>>>>> get
>>>
>>>> any
>>>>>
>>>>>> error
>>>>>>>
>>>>>>>> messages in the log.  I just get the popup error message once
>>>>>>>>
>>>>>>> again.
>>>
>>>> I
>>>>>
>>>>>> am
>>>>>>>
>>>>>>>> using trinidad for another control in the same page.  But I was
>>>>>>>>
>>>>>>> also
>>>
>>>>  trying
>>>>>>>
>>>>>>>> to use trinidad for the upload as well.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Veena
>>>>>>>>
>>>>>>>> On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <
>>>>>>>>
>>>>>>> matzew@apache.org
>>>>>
>>>>>>  wrote:
>>>>>>>>
>>>>>>>> This is not Trinidad, this is Tomahawk.
>>>>>>>>>
>>>>>>>>> The "NoClassDefFoundError" says that you don't
>>>>>>>>> have the "ServletFileUpload" from the given package
>>>>>>>>> in your classpath. This class is part of the Apache Commons
>>>>>>>>> Upload project, which is required by Tomahawk.
>>>>>>>>>
>>>>>>>>> -Matthias
>>>>>>>>>
>>>>>>>>> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <
>>>>>>>>>
>>>>>>>> v.kris21@gmail.com>
>>>
>>>>  wrote:
>>>>>>>
>>>>>>>>  A new development.  Now I am getting this error in the log:
>>>>>>>>>> All I was getting before this is a popup error message.
>>>>>>>>>> Now here is the stacktrace:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> SEVERE: Servlet.service() for servlet Faces Servlet threw
>>>>>>>>>>
>>>>>>>>> exception
>>>>>
>>>>>>
>>>>>>>>>> java.lang.NoClassDefFoundError:
>>>>>>>>>> org/apache/commons/fileupload/servlet/ServletFileUpload
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
>>>
>>>>    ExtensionsFilter.java:321*)
>>>>>>>>>>
>>>>>>>>>> *Thanks,*
>>>>>>>>>> **
>>>>>>>>>> *Veena*
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <
>>>>>>>>>>
>>>>>>>>> matzew@apache.org
>>>>>>>
>>>>>>>>  wrote:
>>>>>>>>>>
>>>>>>>>>> do you have a little bit more information ?
>>>>>>>>>>>
>>>>>>>>>>> cfg, size of the file. error message, stack trace...
>>>>>>>>>>>
>>>>>>>>>>> -Matthias
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <
>>>>>>>>>>>
>>>>>>>>>> v.kris21@gmail.com
>>>
>>>>
>>>>>>  wrote:
>>>>>>>>>
>>>>>>>>>>  Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> I am having trouble making this work.  I have configured
>>>>>>>>>>>>
>>>>>>>>>>> the
>>>
>>>>  web.xml,
>>>>>>>
>>>>>>>>   faces-config.xml
>>>>>>>>>>>> and followed the instructions on the following page:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
>>>
>>>>
>>>>>>>>>>>> I get a following popup error:
>>>>>>>>>>>> Message from webpage:
>>>>>>>>>>>> A file upload error has occured, please verify your upload
>>>>>>>>>>>>
>>>>>>>>>>> data
>>>
>>>> and
>>>>>
>>>>>>  file
>>>>>>>>>
>>>>>>>>>>  name.
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>
>>>>>>>>>>>> Veena
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Matthias Wessendorf
>>>>>>>>>>>
>>>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Matthias Wessendorf
>>>>>>>>>
>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Matthias Wessendorf
>>>>>>>
>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>
>>>

Re: Trinidad file upload

Posted by Matthias Wessendorf <mw...@gmail.com>.
Do you have the Resource servlet? Are you having tr:document ?

Sent from my iPod.

On 03.11.2009, at 21:51, veena pandit <v....@gmail.com> wrote:

> Martin,
>
> Hi,  I tried a small demo app and I followed your instructions;  I  
> get the
> following errors:
>
> _submitFormCheck is not defined
> http://localhost:8080/TrUpload/mypage.jsp line 34
>
> _checkLoad is not defined
> http://localhost:8080/TrUpload/mypage.jsp line 1
>
> _submitForm is not defined
> http://localhost:8080/TrUpload/mypage.jsp line 1.
>
> What am I doing wrong?
>
> Thanks,
>
> Veena
>
> On Tue, Nov 3, 2009 at 4:03 PM, Martin Kočí <Ma...@aura.cz> wr 
> ote:
>
>> It seems that message "A file upload error has occurred, please  
>> verify
>> your upload data and file name" occures on client and has nothing  
>> to do
>> with server configuration. Can you please try  a simple example:
>>
>> <tr:form usesUpload="true">
>> <tr:inputFile value="#{yourBean.uploadFile}" />
>> </tr:form>
>>
>> if it works - if not please look in Firefox at "Tools" -> "Error
>> Console" if there is any error.
>>
>>
>> veena pandit píše v Út 03. 11. 2009 v 14:56 -0500:
>>> Hi Martin,
>>>
>>> I checked my web.xml and the ordering is already the way you state  
>>> it
>> should
>>> be. Anything else I can check for?
>>>
>>> Thanks,
>>>
>>> Veena
>>>
>>> On Tue, Nov 3, 2009 at 3:24 PM, Martin Kočí <Martin.Koci@aura.cz 
>>> > wrote:
>>>
>>>> Hi,
>>>>
>>>> it is a known limitation, it depends on filters ordering in  
>>>> web.xml.
>>>> .
>>>> Look in your web.xml and put something like:
>>>>
>>>> <filter-mapping>
>>>>   <filter-name>trinidad</filter-name>
>>>>   <servlet-name>faces</servlet-name>
>>>> </filter-mapping>
>>>>
>>>> before
>>>>
>>>> <filter-mapping>
>>>>   <filter-name>MyFacesExtensionsFilter</filter-name>
>>>>   <servlet-name>faces</servlet-name>
>>>> </filter-mapping>
>>>>
>>>> Filter declared first will "consume" file upload.
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Martin
>>>>
>>>>
>>>>
>>>>
>>>> veena pandit píše v Út 03. 11. 2009 v 14:00 -0500:
>>>>> I configured it according to the trinidad web page.
>>>>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html
>>>>>
>>>>> Trinidad and Tomahawk are working well together.  I am using  
>>>>> Trinidad
>> for
>>>> a
>>>>> drop down and Tomahawk for file upload from BalusC's blog.  But I
>> just
>>>> added
>>>>> the Trinidad File upload functionality to the web application and
>> that is
>>>>> the only thing that is not working.  I just thought I would use
>> Trinidad
>>>> for
>>>>> both so I could have a common look and feel since this application
>> will
>>>> go
>>>>> into production eventually.
>>>>>
>>>>> I could not find anything else specific to any problems with  
>>>>> Trinidad
>>>> file
>>>>> upload.
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Veena
>>>>>
>>>>> On Tue, Nov 3, 2009 at 1:51 PM, Matthias Wessendorf <
>> matzew@apache.org
>>>>> wrote:
>>>>>
>>>>>> are you sure that you have everything configured correct ?
>>>>>>
>>>>>> Trinidad and tomahawk ?
>>>>>>
>>>>>> I think i remember some issues on the upload case, when mixing  
>>>>>> them
>>>>>> (trinidad and
>>>>>> tomahawk). Perhaps searching the archives gives any hint ? I  
>>>>>> really
>>>>>> don't remember it
>>>>>>
>>>>>> -Matthias
>>>>>>
>>>>>> On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com>
>>>> wrote:
>>>>>>> Well, I have both Tomahawk and trinidad in the same application
>> for
>>>> file
>>>>>>> uploads.
>>>>>>> I added commons.io to the web-inf/lib directory and now I dont
>> get
>>>> any
>>>>>> error
>>>>>>> messages in the log.  I just get the popup error message once
>> again.
>>>> I
>>>>>> am
>>>>>>> using trinidad for another control in the same page.  But I was
>> also
>>>>>> trying
>>>>>>> to use trinidad for the upload as well.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Veena
>>>>>>>
>>>>>>> On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <
>>>> matzew@apache.org
>>>>>>> wrote:
>>>>>>>
>>>>>>>> This is not Trinidad, this is Tomahawk.
>>>>>>>>
>>>>>>>> The "NoClassDefFoundError" says that you don't
>>>>>>>> have the "ServletFileUpload" from the given package
>>>>>>>> in your classpath. This class is part of the Apache Commons
>>>>>>>> Upload project, which is required by Tomahawk.
>>>>>>>>
>>>>>>>> -Matthias
>>>>>>>>
>>>>>>>> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <
>> v.kris21@gmail.com>
>>>>>> wrote:
>>>>>>>>> A new development.  Now I am getting this error in the log:
>>>>>>>>> All I was getting before this is a popup error message.
>>>>>>>>> Now here is the stacktrace:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> SEVERE: Servlet.service() for servlet Faces Servlet threw
>>>> exception
>>>>>>>>>
>>>>>>>>> java.lang.NoClassDefFoundError:
>>>>>>>>> org/apache/commons/fileupload/servlet/ServletFileUpload
>>>>>>>>>
>>>>>>>>> at
>> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
>>>>>>>>> ExtensionsFilter.java:321*)
>>>>>>>>>
>>>>>>>>> *Thanks,*
>>>>>>>>> **
>>>>>>>>> *Veena*
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <
>>>>>> matzew@apache.org
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> do you have a little bit more information ?
>>>>>>>>>>
>>>>>>>>>> cfg, size of the file. error message, stack trace...
>>>>>>>>>>
>>>>>>>>>> -Matthias
>>>>>>>>>>
>>>>>>>>>> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <
>> v.kris21@gmail.com
>>>>>
>>>>>>>> wrote:
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> I am having trouble making this work.  I have configured
>> the
>>>>>> web.xml,
>>>>>>>>>>> faces-config.xml
>>>>>>>>>>> and followed the instructions on the following page:
>>>>>>>>>>>
>>>>>>>>>>>
>> http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
>>>>>>>>>>>
>>>>>>>>>>> I get a following popup error:
>>>>>>>>>>> Message from webpage:
>>>>>>>>>>> A file upload error has occured, please verify your upload
>> data
>>>> and
>>>>>>>> file
>>>>>>>>>>> name.
>>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>>
>>>>>>>>>>> Veena
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Matthias Wessendorf
>>>>>>>>>>
>>>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Matthias Wessendorf
>>>>>>>>
>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Matthias Wessendorf
>>>>>>
>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>
>>>>
>>>>
>>
>>

Re: Trinidad file upload

Posted by veena pandit <v....@gmail.com>.
Martin,

Hi,  I tried a small demo app and I followed your instructions;  I get the
following errors:

_submitFormCheck is not defined
http://localhost:8080/TrUpload/mypage.jsp line 34

_checkLoad is not defined
http://localhost:8080/TrUpload/mypage.jsp line 1

_submitForm is not defined
http://localhost:8080/TrUpload/mypage.jsp line 1.

What am I doing wrong?

Thanks,

Veena

On Tue, Nov 3, 2009 at 4:03 PM, Martin Kočí <Ma...@aura.cz> wrote:

> It seems that message "A file upload error has occurred, please verify
> your upload data and file name" occures on client and has nothing to do
> with server configuration. Can you please try  a simple example:
>
> <tr:form usesUpload="true">
> <tr:inputFile value="#{yourBean.uploadFile}" />
> </tr:form>
>
> if it works - if not please look in Firefox at "Tools" -> "Error
> Console" if there is any error.
>
>
> veena pandit píše v Út 03. 11. 2009 v 14:56 -0500:
>  > Hi Martin,
> >
> > I checked my web.xml and the ordering is already the way you state it
> should
> > be. Anything else I can check for?
> >
> > Thanks,
> >
> > Veena
> >
> > On Tue, Nov 3, 2009 at 3:24 PM, Martin Kočí <Ma...@aura.cz> wrote:
> >
> > > Hi,
> > >
> > > it is a known limitation, it depends on filters ordering in web.xml.
> > > .
> > > Look in your web.xml and put something like:
> > >
> > > <filter-mapping>
> > >    <filter-name>trinidad</filter-name>
> > >    <servlet-name>faces</servlet-name>
> > >  </filter-mapping>
> > >
> > > before
> > >
> > > <filter-mapping>
> > >    <filter-name>MyFacesExtensionsFilter</filter-name>
> > >    <servlet-name>faces</servlet-name>
> > > </filter-mapping>
> > >
> > > Filter declared first will "consume" file upload.
> > >
> > >
> > > Regards,
> > >
> > > Martin
> > >
> > >
> > >
> > >
> > > veena pandit píše v Út 03. 11. 2009 v 14:00 -0500:
> > >  > I configured it according to the trinidad web page.
> > > > http://myfaces.apache.org/trinidad/devguide/fileUpload.html
> > > >
> > > > Trinidad and Tomahawk are working well together.  I am using Trinidad
> for
> > > a
> > > > drop down and Tomahawk for file upload from BalusC's blog.  But I
> just
> > > added
> > > > the Trinidad File upload functionality to the web application and
> that is
> > > > the only thing that is not working.  I just thought I would use
> Trinidad
> > > for
> > > > both so I could have a common look and feel since this application
> will
> > > go
> > > > into production eventually.
> > > >
> > > > I could not find anything else specific to any problems with Trinidad
> > > file
> > > > upload.
> > > >
> > > > Thanks.
> > > >
> > > > Veena
> > > >
> > > > On Tue, Nov 3, 2009 at 1:51 PM, Matthias Wessendorf <
> matzew@apache.org
> > > >wrote:
> > > >
> > > > > are you sure that you have everything configured correct ?
> > > > >
> > > > > Trinidad and tomahawk ?
> > > > >
> > > > > I think i remember some issues on the upload case, when mixing them
> > > > > (trinidad and
> > > > > tomahawk). Perhaps searching the archives gives any hint ? I really
> > > > > don't remember it
> > > > >
> > > > > -Matthias
> > > > >
> > > > > On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com>
> > > wrote:
> > > > > > Well, I have both Tomahawk and trinidad in the same application
> for
> > > file
> > > > > > uploads.
> > > > > > I added commons.io to the web-inf/lib directory and now I dont
> get
> > > any
> > > > > error
> > > > > > messages in the log.  I just get the popup error message once
> again.
> > >  I
> > > > > am
> > > > > > using trinidad for another control in the same page.  But I was
> also
> > > > > trying
> > > > > > to use trinidad for the upload as well.
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > Veena
> > > > > >
> > > > > > On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <
> > > matzew@apache.org
> > > > > >wrote:
> > > > > >
> > > > > >> This is not Trinidad, this is Tomahawk.
> > > > > >>
> > > > > >> The "NoClassDefFoundError" says that you don't
> > > > > >> have the "ServletFileUpload" from the given package
> > > > > >> in your classpath. This class is part of the Apache Commons
> > > > > >> Upload project, which is required by Tomahawk.
> > > > > >>
> > > > > >> -Matthias
> > > > > >>
> > > > > >> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <
> v.kris21@gmail.com>
> > > > > wrote:
> > > > > >> > A new development.  Now I am getting this error in the log:
> > > > > >> > All I was getting before this is a popup error message.
> > > > > >> > Now here is the stacktrace:
> > > > > >> >
> > > > > >> >
> > > > > >> > SEVERE: Servlet.service() for servlet Faces Servlet threw
> > > exception
> > > > > >> >
> > > > > >> > java.lang.NoClassDefFoundError:
> > > > > >> > org/apache/commons/fileupload/servlet/ServletFileUpload
> > > > > >> >
> > > > > >> > at
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
> > > > > >> > ExtensionsFilter.java:321*)
> > > > > >> >
> > > > > >> > *Thanks,*
> > > > > >> > **
> > > > > >> > *Veena*
> > > > > >> >
> > > > > >> >
> > > > > >> >
> > > > > >> > On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <
> > > > > matzew@apache.org
> > > > > >> >wrote:
> > > > > >> >
> > > > > >> >> do you have a little bit more information ?
> > > > > >> >>
> > > > > >> >> cfg, size of the file. error message, stack trace...
> > > > > >> >>
> > > > > >> >> -Matthias
> > > > > >> >>
> > > > > >> >> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <
> v.kris21@gmail.com
> > > >
> > > > > >> wrote:
> > > > > >> >> > Hi,
> > > > > >> >> >
> > > > > >> >> > I am having trouble making this work.  I have configured
> the
> > > > > web.xml,
> > > > > >> >> > faces-config.xml
> > > > > >> >> > and followed the instructions on the following page:
> > > > > >> >> >
> > > > > >> >> >
> http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
> > > > > >> >> >
> > > > > >> >> > I get a following popup error:
> > > > > >> >> > Message from webpage:
> > > > > >> >> > A file upload error has occured, please verify your upload
> data
> > > and
> > > > > >> file
> > > > > >> >> > name.
> > > > > >> >> >
> > > > > >> >> > Thanks,
> > > > > >> >> >
> > > > > >> >> > Veena
> > > > > >> >> >
> > > > > >> >>
> > > > > >> >>
> > > > > >> >>
> > > > > >> >> --
> > > > > >> >> Matthias Wessendorf
> > > > > >> >>
> > > > > >> >> blog: http://matthiaswessendorf.wordpress.com/
> > > > > >> >> sessions: http://www.slideshare.net/mwessendorf
> > > > > >> >> twitter: http://twitter.com/mwessendorf
> > > > > >> >>
> > > > > >> >
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >> --
> > > > > >>  Matthias Wessendorf
> > > > > >>
> > > > > >> blog: http://matthiaswessendorf.wordpress.com/
> > > > > >> sessions: http://www.slideshare.net/mwessendorf
> > > > > >> twitter: http://twitter.com/mwessendorf
> > > > > >>
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > >  Matthias Wessendorf
> > > > >
> > > > > blog: http://matthiaswessendorf.wordpress.com/
> > > > > sessions: http://www.slideshare.net/mwessendorf
> > > > > twitter: http://twitter.com/mwessendorf
> > > > >
> > >
> > >
>
>

Re: Trinidad file upload

Posted by Martin Kočí <Ma...@aura.cz>.
It seems that message "A file upload error has occurred, please verify
your upload data and file name" occures on client and has nothing to do
with server configuration. Can you please try  a simple example:

<tr:form usesUpload="true">
<tr:inputFile value="#{yourBean.uploadFile}" />
</tr:form>

if it works - if not please look in Firefox at "Tools" -> "Error
Console" if there is any error.


veena pandit píše v Út 03. 11. 2009 v 14:56 -0500:
> Hi Martin,
> 
> I checked my web.xml and the ordering is already the way you state it should
> be. Anything else I can check for?
> 
> Thanks,
> 
> Veena
> 
> On Tue, Nov 3, 2009 at 3:24 PM, Martin Kočí <Ma...@aura.cz> wrote:
> 
> > Hi,
> >
> > it is a known limitation, it depends on filters ordering in web.xml.
> > .
> > Look in your web.xml and put something like:
> >
> > <filter-mapping>
> >    <filter-name>trinidad</filter-name>
> >    <servlet-name>faces</servlet-name>
> >  </filter-mapping>
> >
> > before
> >
> > <filter-mapping>
> >    <filter-name>MyFacesExtensionsFilter</filter-name>
> >    <servlet-name>faces</servlet-name>
> > </filter-mapping>
> >
> > Filter declared first will "consume" file upload.
> >
> >
> > Regards,
> >
> > Martin
> >
> >
> >
> >
> > veena pandit píše v Út 03. 11. 2009 v 14:00 -0500:
> >  > I configured it according to the trinidad web page.
> > > http://myfaces.apache.org/trinidad/devguide/fileUpload.html
> > >
> > > Trinidad and Tomahawk are working well together.  I am using Trinidad for
> > a
> > > drop down and Tomahawk for file upload from BalusC's blog.  But I just
> > added
> > > the Trinidad File upload functionality to the web application and that is
> > > the only thing that is not working.  I just thought I would use Trinidad
> > for
> > > both so I could have a common look and feel since this application will
> > go
> > > into production eventually.
> > >
> > > I could not find anything else specific to any problems with Trinidad
> > file
> > > upload.
> > >
> > > Thanks.
> > >
> > > Veena
> > >
> > > On Tue, Nov 3, 2009 at 1:51 PM, Matthias Wessendorf <matzew@apache.org
> > >wrote:
> > >
> > > > are you sure that you have everything configured correct ?
> > > >
> > > > Trinidad and tomahawk ?
> > > >
> > > > I think i remember some issues on the upload case, when mixing them
> > > > (trinidad and
> > > > tomahawk). Perhaps searching the archives gives any hint ? I really
> > > > don't remember it
> > > >
> > > > -Matthias
> > > >
> > > > On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com>
> > wrote:
> > > > > Well, I have both Tomahawk and trinidad in the same application for
> > file
> > > > > uploads.
> > > > > I added commons.io to the web-inf/lib directory and now I dont get
> > any
> > > > error
> > > > > messages in the log.  I just get the popup error message once again.
> >  I
> > > > am
> > > > > using trinidad for another control in the same page.  But I was also
> > > > trying
> > > > > to use trinidad for the upload as well.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Veena
> > > > >
> > > > > On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <
> > matzew@apache.org
> > > > >wrote:
> > > > >
> > > > >> This is not Trinidad, this is Tomahawk.
> > > > >>
> > > > >> The "NoClassDefFoundError" says that you don't
> > > > >> have the "ServletFileUpload" from the given package
> > > > >> in your classpath. This class is part of the Apache Commons
> > > > >> Upload project, which is required by Tomahawk.
> > > > >>
> > > > >> -Matthias
> > > > >>
> > > > >> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <v....@gmail.com>
> > > > wrote:
> > > > >> > A new development.  Now I am getting this error in the log:
> > > > >> > All I was getting before this is a popup error message.
> > > > >> > Now here is the stacktrace:
> > > > >> >
> > > > >> >
> > > > >> > SEVERE: Servlet.service() for servlet Faces Servlet threw
> > exception
> > > > >> >
> > > > >> > java.lang.NoClassDefFoundError:
> > > > >> > org/apache/commons/fileupload/servlet/ServletFileUpload
> > > > >> >
> > > > >> > at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
> > > > >> > ExtensionsFilter.java:321*)
> > > > >> >
> > > > >> > *Thanks,*
> > > > >> > **
> > > > >> > *Veena*
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> > On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <
> > > > matzew@apache.org
> > > > >> >wrote:
> > > > >> >
> > > > >> >> do you have a little bit more information ?
> > > > >> >>
> > > > >> >> cfg, size of the file. error message, stack trace...
> > > > >> >>
> > > > >> >> -Matthias
> > > > >> >>
> > > > >> >> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <v.kris21@gmail.com
> > >
> > > > >> wrote:
> > > > >> >> > Hi,
> > > > >> >> >
> > > > >> >> > I am having trouble making this work.  I have configured the
> > > > web.xml,
> > > > >> >> > faces-config.xml
> > > > >> >> > and followed the instructions on the following page:
> > > > >> >> >
> > > > >> >> > http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
> > > > >> >> >
> > > > >> >> > I get a following popup error:
> > > > >> >> > Message from webpage:
> > > > >> >> > A file upload error has occured, please verify your upload data
> > and
> > > > >> file
> > > > >> >> > name.
> > > > >> >> >
> > > > >> >> > Thanks,
> > > > >> >> >
> > > > >> >> > Veena
> > > > >> >> >
> > > > >> >>
> > > > >> >>
> > > > >> >>
> > > > >> >> --
> > > > >> >> Matthias Wessendorf
> > > > >> >>
> > > > >> >> blog: http://matthiaswessendorf.wordpress.com/
> > > > >> >> sessions: http://www.slideshare.net/mwessendorf
> > > > >> >> twitter: http://twitter.com/mwessendorf
> > > > >> >>
> > > > >> >
> > > > >>
> > > > >>
> > > > >>
> > > > >> --
> > > > >>  Matthias Wessendorf
> > > > >>
> > > > >> blog: http://matthiaswessendorf.wordpress.com/
> > > > >> sessions: http://www.slideshare.net/mwessendorf
> > > > >> twitter: http://twitter.com/mwessendorf
> > > > >>
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > >  Matthias Wessendorf
> > > >
> > > > blog: http://matthiaswessendorf.wordpress.com/
> > > > sessions: http://www.slideshare.net/mwessendorf
> > > > twitter: http://twitter.com/mwessendorf
> > > >
> >
> >


Re: Trinidad file upload

Posted by veena pandit <v....@gmail.com>.
Hi Martin,

I checked my web.xml and the ordering is already the way you state it should
be. Anything else I can check for?

Thanks,

Veena

On Tue, Nov 3, 2009 at 3:24 PM, Martin Kočí <Ma...@aura.cz> wrote:

> Hi,
>
> it is a known limitation, it depends on filters ordering in web.xml.
> .
> Look in your web.xml and put something like:
>
> <filter-mapping>
>    <filter-name>trinidad</filter-name>
>    <servlet-name>faces</servlet-name>
>  </filter-mapping>
>
> before
>
> <filter-mapping>
>    <filter-name>MyFacesExtensionsFilter</filter-name>
>    <servlet-name>faces</servlet-name>
> </filter-mapping>
>
> Filter declared first will "consume" file upload.
>
>
> Regards,
>
> Martin
>
>
>
>
> veena pandit píše v Út 03. 11. 2009 v 14:00 -0500:
>  > I configured it according to the trinidad web page.
> > http://myfaces.apache.org/trinidad/devguide/fileUpload.html
> >
> > Trinidad and Tomahawk are working well together.  I am using Trinidad for
> a
> > drop down and Tomahawk for file upload from BalusC's blog.  But I just
> added
> > the Trinidad File upload functionality to the web application and that is
> > the only thing that is not working.  I just thought I would use Trinidad
> for
> > both so I could have a common look and feel since this application will
> go
> > into production eventually.
> >
> > I could not find anything else specific to any problems with Trinidad
> file
> > upload.
> >
> > Thanks.
> >
> > Veena
> >
> > On Tue, Nov 3, 2009 at 1:51 PM, Matthias Wessendorf <matzew@apache.org
> >wrote:
> >
> > > are you sure that you have everything configured correct ?
> > >
> > > Trinidad and tomahawk ?
> > >
> > > I think i remember some issues on the upload case, when mixing them
> > > (trinidad and
> > > tomahawk). Perhaps searching the archives gives any hint ? I really
> > > don't remember it
> > >
> > > -Matthias
> > >
> > > On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com>
> wrote:
> > > > Well, I have both Tomahawk and trinidad in the same application for
> file
> > > > uploads.
> > > > I added commons.io to the web-inf/lib directory and now I dont get
> any
> > > error
> > > > messages in the log.  I just get the popup error message once again.
>  I
> > > am
> > > > using trinidad for another control in the same page.  But I was also
> > > trying
> > > > to use trinidad for the upload as well.
> > > >
> > > > Thanks,
> > > >
> > > > Veena
> > > >
> > > > On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <
> matzew@apache.org
> > > >wrote:
> > > >
> > > >> This is not Trinidad, this is Tomahawk.
> > > >>
> > > >> The "NoClassDefFoundError" says that you don't
> > > >> have the "ServletFileUpload" from the given package
> > > >> in your classpath. This class is part of the Apache Commons
> > > >> Upload project, which is required by Tomahawk.
> > > >>
> > > >> -Matthias
> > > >>
> > > >> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <v....@gmail.com>
> > > wrote:
> > > >> > A new development.  Now I am getting this error in the log:
> > > >> > All I was getting before this is a popup error message.
> > > >> > Now here is the stacktrace:
> > > >> >
> > > >> >
> > > >> > SEVERE: Servlet.service() for servlet Faces Servlet threw
> exception
> > > >> >
> > > >> > java.lang.NoClassDefFoundError:
> > > >> > org/apache/commons/fileupload/servlet/ServletFileUpload
> > > >> >
> > > >> > at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
> > > >> > ExtensionsFilter.java:321*)
> > > >> >
> > > >> > *Thanks,*
> > > >> > **
> > > >> > *Veena*
> > > >> >
> > > >> >
> > > >> >
> > > >> > On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <
> > > matzew@apache.org
> > > >> >wrote:
> > > >> >
> > > >> >> do you have a little bit more information ?
> > > >> >>
> > > >> >> cfg, size of the file. error message, stack trace...
> > > >> >>
> > > >> >> -Matthias
> > > >> >>
> > > >> >> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <v.kris21@gmail.com
> >
> > > >> wrote:
> > > >> >> > Hi,
> > > >> >> >
> > > >> >> > I am having trouble making this work.  I have configured the
> > > web.xml,
> > > >> >> > faces-config.xml
> > > >> >> > and followed the instructions on the following page:
> > > >> >> >
> > > >> >> > http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
> > > >> >> >
> > > >> >> > I get a following popup error:
> > > >> >> > Message from webpage:
> > > >> >> > A file upload error has occured, please verify your upload data
> and
> > > >> file
> > > >> >> > name.
> > > >> >> >
> > > >> >> > Thanks,
> > > >> >> >
> > > >> >> > Veena
> > > >> >> >
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >> --
> > > >> >> Matthias Wessendorf
> > > >> >>
> > > >> >> blog: http://matthiaswessendorf.wordpress.com/
> > > >> >> sessions: http://www.slideshare.net/mwessendorf
> > > >> >> twitter: http://twitter.com/mwessendorf
> > > >> >>
> > > >> >
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >>  Matthias Wessendorf
> > > >>
> > > >> blog: http://matthiaswessendorf.wordpress.com/
> > > >> sessions: http://www.slideshare.net/mwessendorf
> > > >> twitter: http://twitter.com/mwessendorf
> > > >>
> > > >
> > >
> > >
> > >
> > > --
> > >  Matthias Wessendorf
> > >
> > > blog: http://matthiaswessendorf.wordpress.com/
> > > sessions: http://www.slideshare.net/mwessendorf
> > > twitter: http://twitter.com/mwessendorf
> > >
>
>

Re: Trinidad file upload

Posted by Martin Kočí <Ma...@aura.cz>.
Hi, 

it is a known limitation, it depends on filters ordering in web.xml.
.
Look in your web.xml and put something like:

<filter-mapping>
    <filter-name>trinidad</filter-name>
    <servlet-name>faces</servlet-name>
  </filter-mapping>

before

<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <servlet-name>faces</servlet-name>
</filter-mapping>

Filter declared first will "consume" file upload.


Regards,

Martin




veena pandit píše v Út 03. 11. 2009 v 14:00 -0500:
> I configured it according to the trinidad web page.
> http://myfaces.apache.org/trinidad/devguide/fileUpload.html
> 
> Trinidad and Tomahawk are working well together.  I am using Trinidad for a
> drop down and Tomahawk for file upload from BalusC's blog.  But I just added
> the Trinidad File upload functionality to the web application and that is
> the only thing that is not working.  I just thought I would use Trinidad for
> both so I could have a common look and feel since this application will go
> into production eventually.
> 
> I could not find anything else specific to any problems with Trinidad file
> upload.
> 
> Thanks.
> 
> Veena
> 
> On Tue, Nov 3, 2009 at 1:51 PM, Matthias Wessendorf <ma...@apache.org>wrote:
> 
> > are you sure that you have everything configured correct ?
> >
> > Trinidad and tomahawk ?
> >
> > I think i remember some issues on the upload case, when mixing them
> > (trinidad and
> > tomahawk). Perhaps searching the archives gives any hint ? I really
> > don't remember it
> >
> > -Matthias
> >
> > On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com> wrote:
> > > Well, I have both Tomahawk and trinidad in the same application for file
> > > uploads.
> > > I added commons.io to the web-inf/lib directory and now I dont get any
> > error
> > > messages in the log.  I just get the popup error message once again.  I
> > am
> > > using trinidad for another control in the same page.  But I was also
> > trying
> > > to use trinidad for the upload as well.
> > >
> > > Thanks,
> > >
> > > Veena
> > >
> > > On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <matzew@apache.org
> > >wrote:
> > >
> > >> This is not Trinidad, this is Tomahawk.
> > >>
> > >> The "NoClassDefFoundError" says that you don't
> > >> have the "ServletFileUpload" from the given package
> > >> in your classpath. This class is part of the Apache Commons
> > >> Upload project, which is required by Tomahawk.
> > >>
> > >> -Matthias
> > >>
> > >> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <v....@gmail.com>
> > wrote:
> > >> > A new development.  Now I am getting this error in the log:
> > >> > All I was getting before this is a popup error message.
> > >> > Now here is the stacktrace:
> > >> >
> > >> >
> > >> > SEVERE: Servlet.service() for servlet Faces Servlet threw exception
> > >> >
> > >> > java.lang.NoClassDefFoundError:
> > >> > org/apache/commons/fileupload/servlet/ServletFileUpload
> > >> >
> > >> > at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
> > >> > ExtensionsFilter.java:321*)
> > >> >
> > >> > *Thanks,*
> > >> > **
> > >> > *Veena*
> > >> >
> > >> >
> > >> >
> > >> > On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <
> > matzew@apache.org
> > >> >wrote:
> > >> >
> > >> >> do you have a little bit more information ?
> > >> >>
> > >> >> cfg, size of the file. error message, stack trace...
> > >> >>
> > >> >> -Matthias
> > >> >>
> > >> >> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <v....@gmail.com>
> > >> wrote:
> > >> >> > Hi,
> > >> >> >
> > >> >> > I am having trouble making this work.  I have configured the
> > web.xml,
> > >> >> > faces-config.xml
> > >> >> > and followed the instructions on the following page:
> > >> >> >
> > >> >> > http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
> > >> >> >
> > >> >> > I get a following popup error:
> > >> >> > Message from webpage:
> > >> >> > A file upload error has occured, please verify your upload data and
> > >> file
> > >> >> > name.
> > >> >> >
> > >> >> > Thanks,
> > >> >> >
> > >> >> > Veena
> > >> >> >
> > >> >>
> > >> >>
> > >> >>
> > >> >> --
> > >> >> Matthias Wessendorf
> > >> >>
> > >> >> blog: http://matthiaswessendorf.wordpress.com/
> > >> >> sessions: http://www.slideshare.net/mwessendorf
> > >> >> twitter: http://twitter.com/mwessendorf
> > >> >>
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >>  Matthias Wessendorf
> > >>
> > >> blog: http://matthiaswessendorf.wordpress.com/
> > >> sessions: http://www.slideshare.net/mwessendorf
> > >> twitter: http://twitter.com/mwessendorf
> > >>
> > >
> >
> >
> >
> > --
> >  Matthias Wessendorf
> >
> > blog: http://matthiaswessendorf.wordpress.com/
> > sessions: http://www.slideshare.net/mwessendorf
> > twitter: http://twitter.com/mwessendorf
> >


Re: Trinidad file upload

Posted by veena pandit <v....@gmail.com>.
I configured it according to the trinidad web page.
http://myfaces.apache.org/trinidad/devguide/fileUpload.html

Trinidad and Tomahawk are working well together.  I am using Trinidad for a
drop down and Tomahawk for file upload from BalusC's blog.  But I just added
the Trinidad File upload functionality to the web application and that is
the only thing that is not working.  I just thought I would use Trinidad for
both so I could have a common look and feel since this application will go
into production eventually.

I could not find anything else specific to any problems with Trinidad file
upload.

Thanks.

Veena

On Tue, Nov 3, 2009 at 1:51 PM, Matthias Wessendorf <ma...@apache.org>wrote:

> are you sure that you have everything configured correct ?
>
> Trinidad and tomahawk ?
>
> I think i remember some issues on the upload case, when mixing them
> (trinidad and
> tomahawk). Perhaps searching the archives gives any hint ? I really
> don't remember it
>
> -Matthias
>
> On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com> wrote:
> > Well, I have both Tomahawk and trinidad in the same application for file
> > uploads.
> > I added commons.io to the web-inf/lib directory and now I dont get any
> error
> > messages in the log.  I just get the popup error message once again.  I
> am
> > using trinidad for another control in the same page.  But I was also
> trying
> > to use trinidad for the upload as well.
> >
> > Thanks,
> >
> > Veena
> >
> > On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <matzew@apache.org
> >wrote:
> >
> >> This is not Trinidad, this is Tomahawk.
> >>
> >> The "NoClassDefFoundError" says that you don't
> >> have the "ServletFileUpload" from the given package
> >> in your classpath. This class is part of the Apache Commons
> >> Upload project, which is required by Tomahawk.
> >>
> >> -Matthias
> >>
> >> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <v....@gmail.com>
> wrote:
> >> > A new development.  Now I am getting this error in the log:
> >> > All I was getting before this is a popup error message.
> >> > Now here is the stacktrace:
> >> >
> >> >
> >> > SEVERE: Servlet.service() for servlet Faces Servlet threw exception
> >> >
> >> > java.lang.NoClassDefFoundError:
> >> > org/apache/commons/fileupload/servlet/ServletFileUpload
> >> >
> >> > at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
> >> > ExtensionsFilter.java:321*)
> >> >
> >> > *Thanks,*
> >> > **
> >> > *Veena*
> >> >
> >> >
> >> >
> >> > On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <
> matzew@apache.org
> >> >wrote:
> >> >
> >> >> do you have a little bit more information ?
> >> >>
> >> >> cfg, size of the file. error message, stack trace...
> >> >>
> >> >> -Matthias
> >> >>
> >> >> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <v....@gmail.com>
> >> wrote:
> >> >> > Hi,
> >> >> >
> >> >> > I am having trouble making this work.  I have configured the
> web.xml,
> >> >> > faces-config.xml
> >> >> > and followed the instructions on the following page:
> >> >> >
> >> >> > http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
> >> >> >
> >> >> > I get a following popup error:
> >> >> > Message from webpage:
> >> >> > A file upload error has occured, please verify your upload data and
> >> file
> >> >> > name.
> >> >> >
> >> >> > Thanks,
> >> >> >
> >> >> > Veena
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Matthias Wessendorf
> >> >>
> >> >> blog: http://matthiaswessendorf.wordpress.com/
> >> >> sessions: http://www.slideshare.net/mwessendorf
> >> >> twitter: http://twitter.com/mwessendorf
> >> >>
> >> >
> >>
> >>
> >>
> >> --
> >>  Matthias Wessendorf
> >>
> >> blog: http://matthiaswessendorf.wordpress.com/
> >> sessions: http://www.slideshare.net/mwessendorf
> >> twitter: http://twitter.com/mwessendorf
> >>
> >
>
>
>
> --
>  Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>

Re: Trinidad file upload

Posted by Matthias Wessendorf <ma...@apache.org>.
are you sure that you have everything configured correct ?

Trinidad and tomahawk ?

I think i remember some issues on the upload case, when mixing them
(trinidad and
tomahawk). Perhaps searching the archives gives any hint ? I really
don't remember it

-Matthias

On Tue, Nov 3, 2009 at 7:48 PM, veena pandit <v....@gmail.com> wrote:
> Well, I have both Tomahawk and trinidad in the same application for file
> uploads.
> I added commons.io to the web-inf/lib directory and now I dont get any error
> messages in the log.  I just get the popup error message once again.  I am
> using trinidad for another control in the same page.  But I was also trying
> to use trinidad for the upload as well.
>
> Thanks,
>
> Veena
>
> On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <ma...@apache.org>wrote:
>
>> This is not Trinidad, this is Tomahawk.
>>
>> The "NoClassDefFoundError" says that you don't
>> have the "ServletFileUpload" from the given package
>> in your classpath. This class is part of the Apache Commons
>> Upload project, which is required by Tomahawk.
>>
>> -Matthias
>>
>> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <v....@gmail.com> wrote:
>> > A new development.  Now I am getting this error in the log:
>> > All I was getting before this is a popup error message.
>> > Now here is the stacktrace:
>> >
>> >
>> > SEVERE: Servlet.service() for servlet Faces Servlet threw exception
>> >
>> > java.lang.NoClassDefFoundError:
>> > org/apache/commons/fileupload/servlet/ServletFileUpload
>> >
>> > at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
>> > ExtensionsFilter.java:321*)
>> >
>> > *Thanks,*
>> > **
>> > *Veena*
>> >
>> >
>> >
>> > On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <matzew@apache.org
>> >wrote:
>> >
>> >> do you have a little bit more information ?
>> >>
>> >> cfg, size of the file. error message, stack trace...
>> >>
>> >> -Matthias
>> >>
>> >> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <v....@gmail.com>
>> wrote:
>> >> > Hi,
>> >> >
>> >> > I am having trouble making this work.  I have configured the web.xml,
>> >> > faces-config.xml
>> >> > and followed the instructions on the following page:
>> >> >
>> >> > http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
>> >> >
>> >> > I get a following popup error:
>> >> > Message from webpage:
>> >> > A file upload error has occured, please verify your upload data and
>> file
>> >> > name.
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Veena
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Matthias Wessendorf
>> >>
>> >> blog: http://matthiaswessendorf.wordpress.com/
>> >> sessions: http://www.slideshare.net/mwessendorf
>> >> twitter: http://twitter.com/mwessendorf
>> >>
>> >
>>
>>
>>
>> --
>>  Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>>
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Re: Trinidad file upload

Posted by veena pandit <v....@gmail.com>.
Well, I have both Tomahawk and trinidad in the same application for file
uploads.
I added commons.io to the web-inf/lib directory and now I dont get any error
messages in the log.  I just get the popup error message once again.  I am
using trinidad for another control in the same page.  But I was also trying
to use trinidad for the upload as well.

Thanks,

Veena

On Tue, Nov 3, 2009 at 1:45 PM, Matthias Wessendorf <ma...@apache.org>wrote:

> This is not Trinidad, this is Tomahawk.
>
> The "NoClassDefFoundError" says that you don't
> have the "ServletFileUpload" from the given package
> in your classpath. This class is part of the Apache Commons
> Upload project, which is required by Tomahawk.
>
> -Matthias
>
> On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <v....@gmail.com> wrote:
> > A new development.  Now I am getting this error in the log:
> > All I was getting before this is a popup error message.
> > Now here is the stacktrace:
> >
> >
> > SEVERE: Servlet.service() for servlet Faces Servlet threw exception
> >
> > java.lang.NoClassDefFoundError:
> > org/apache/commons/fileupload/servlet/ServletFileUpload
> >
> > at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
> > ExtensionsFilter.java:321*)
> >
> > *Thanks,*
> > **
> > *Veena*
> >
> >
> >
> > On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <matzew@apache.org
> >wrote:
> >
> >> do you have a little bit more information ?
> >>
> >> cfg, size of the file. error message, stack trace...
> >>
> >> -Matthias
> >>
> >> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <v....@gmail.com>
> wrote:
> >> > Hi,
> >> >
> >> > I am having trouble making this work.  I have configured the web.xml,
> >> > faces-config.xml
> >> > and followed the instructions on the following page:
> >> >
> >> > http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
> >> >
> >> > I get a following popup error:
> >> > Message from webpage:
> >> > A file upload error has occured, please verify your upload data and
> file
> >> > name.
> >> >
> >> > Thanks,
> >> >
> >> > Veena
> >> >
> >>
> >>
> >>
> >> --
> >> Matthias Wessendorf
> >>
> >> blog: http://matthiaswessendorf.wordpress.com/
> >> sessions: http://www.slideshare.net/mwessendorf
> >> twitter: http://twitter.com/mwessendorf
> >>
> >
>
>
>
> --
>  Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>

Re: Trinidad file upload

Posted by Matthias Wessendorf <ma...@apache.org>.
This is not Trinidad, this is Tomahawk.

The "NoClassDefFoundError" says that you don't
have the "ServletFileUpload" from the given package
in your classpath. This class is part of the Apache Commons
Upload project, which is required by Tomahawk.

-Matthias

On Tue, Nov 3, 2009 at 7:38 PM, veena pandit <v....@gmail.com> wrote:
> A new development.  Now I am getting this error in the log:
> All I was getting before this is a popup error message.
> Now here is the stacktrace:
>
>
> SEVERE: Servlet.service() for servlet Faces Servlet threw exception
>
> java.lang.NoClassDefFoundError:
> org/apache/commons/fileupload/servlet/ServletFileUpload
>
> at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
> ExtensionsFilter.java:321*)
>
> *Thanks,*
> **
> *Veena*
>
>
>
> On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <ma...@apache.org>wrote:
>
>> do you have a little bit more information ?
>>
>> cfg, size of the file. error message, stack trace...
>>
>> -Matthias
>>
>> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <v....@gmail.com> wrote:
>> > Hi,
>> >
>> > I am having trouble making this work.  I have configured the web.xml,
>> > faces-config.xml
>> > and followed the instructions on the following page:
>> >
>> > http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
>> >
>> > I get a following popup error:
>> > Message from webpage:
>> > A file upload error has occured, please verify your upload data and file
>> > name.
>> >
>> > Thanks,
>> >
>> > Veena
>> >
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>>
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Re: Trinidad file upload

Posted by veena pandit <v....@gmail.com>.
A new development.  Now I am getting this error in the log:
All I was getting before this is a popup error message.
Now here is the stacktrace:


SEVERE: Servlet.service() for servlet Faces Servlet threw exception

java.lang.NoClassDefFoundError:
org/apache/commons/fileupload/servlet/ServletFileUpload

at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
ExtensionsFilter.java:321*)

*Thanks,*
**
*Veena*



On Tue, Nov 3, 2009 at 1:33 PM, Matthias Wessendorf <ma...@apache.org>wrote:

> do you have a little bit more information ?
>
> cfg, size of the file. error message, stack trace...
>
> -Matthias
>
> On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <v....@gmail.com> wrote:
> > Hi,
> >
> > I am having trouble making this work.  I have configured the web.xml,
> > faces-config.xml
> > and followed the instructions on the following page:
> >
> > http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
> >
> > I get a following popup error:
> > Message from webpage:
> > A file upload error has occured, please verify your upload data and file
> > name.
> >
> > Thanks,
> >
> > Veena
> >
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>

Re: Trinidad file upload

Posted by Matthias Wessendorf <ma...@apache.org>.
do you have a little bit more information ?

cfg, size of the file. error message, stack trace...

-Matthias

On Tue, Nov 3, 2009 at 7:26 PM, veena pandit <v....@gmail.com> wrote:
> Hi,
>
> I am having trouble making this work.  I have configured the web.xml,
> faces-config.xml
> and followed the instructions on the following page:
>
> http://myfaces.apache.org/trinidad/devguide/fileUpload.html.
>
> I get a following popup error:
> Message from webpage:
> A file upload error has occured, please verify your upload data and file
> name.
>
> Thanks,
>
> Veena
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf