Actually I see something else.  You are trying to upload files using an
array of FormFiles named arquivo. However, your notation is treating them as
one item instead of indexed.  Like so:

private FormFile[] arquivo;

So you see this code in your JSP:

<html:file property="arquivo" size="50"/>

Is not the same as an indexed item or array which you've defined in your
ActionForm.  It must be accessed with indexes:

<html:file property="arquivo[0]" size="50"/>
<html:file property="arquivo[1]" size="50"/>

Regards,
David

-----Original Message-----
From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: Monday, October 16, 2006 3:25 PM
To: Struts Users Mailing List
Subject: Re: Why this does not work?


Walter-
You need to identify an ActionForm and work up from there
heres a link to get you started
http://www.roseindia.net/struts/strutsfileupload.shtml

your
<html:form action="/FooAction" should point to your Action class

later in struts-config.xml you need to associate FooAction with your custom
form
<action path = "/FooAction" type="Yourpackage.ConcatenarForm"

where you have defined both the
FooAction Class as well as the Forms class
package.yourpackage.ConcatenarForm class

Anyone else?
Martin --
This e-mail communication and any attachments may contain confidential and
privileged information for the use of the
designated recipients named above. If you are not the intended recipient,
you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination,
distribution or copying of it or its
contents
----- Original Message -----
From: "Walter do Valle" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Monday, October 16, 2006 3:01 PM
Subject: Why this does not work?


> In Struts 1.1 I used something like that to Upload multiple files
> (undefined number of files).
> Why does't this work anymore?
>
> public class ConcatenarForm extends ActionForm {
>
>    private FormFile[] arquivo;
>
>    public FormFile[] getArquivo() {
>        return arquivo;
>    }
>
>    public void setArquivo(FormFile[] arquivo) {
>        this.arquivo = arquivo;
>    }
>
> }
>
> <html:form action="/concatenarArquivos" enctype="multipart/form-data"
> method="POST" onsubmit="return validateConcatenarForm(this)">
>              <html:file property="arquivo" size="50"/>
>              <html:file property="arquivo" size="50"/>
>
> </html:form>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to