Hi Pierre,

I don't see where Velocity makes the difference here.  It's just for
generating the html that the browsers render.  Are you using the
VelocityStruts tools?  If so, can you show us a snippet of the
relevant template?  Also, it might also be good to attach the same
relevant snippets of the html that you get as output from that
template and from a parallel jsp.  The difference between the two
might be quite instructive.  I'm also curious how the html output
changes when you change the FormFile variable into a String variable.

I've never had cause to use or look into Struts' FileUpload support
before, so i don't know much.  But perhaps i can be an extra set of
eyes to spot differences in the html output.  Or maybe someone else on
the list will be able to help.

Oh, and this is a question that belongs on the [EMAIL PROTECTED]
or [EMAIL PROTECTED] mailing lists.  Unless we identify a bug in the
VelocityStruts tools, this has much more to do with the *using* of
Velocity and Struts than it does with the development of Velocity. :)

-nathan

On 9/1/05, Pierre-Alain Branger <[EMAIL PROTECTED]> wrote:
> Hi All,
> 
> I can easily do an upload, using jsp and the struts uploadAction, but
> using velocity I obtain the folowing errors in the firefox and mozilla
> browsers:
> 
> javax.servlet.ServletException: BeanUtils.populate
> and
> java.lang.IllegalArgumentException: argument type mismatch
> 
> However, I don't have any error using Konqueror or Safari.
> 
> Here is my FileUploadForm.java
> 
> import javax.servlet.http.HttpServletRequest;
> import org.apache.struts.action.*;
> import org.apache.struts.upload.FormFile;
> import org.apache.struts.upload.MultipartRequestHandler;
> 
> public class FileUploadForm extends ActionForm {
>     protected FormFile file;
>     protected String type;
> 
>     public String getType() { return type; }
>     public void setType(String s){ type =3D s; }
> 
>     public FormFile getFile() { return file; }
>     public void setFile(FormFile file) { this.file =3D file; }
>  }
> 
> If I change the FormFile variable into a String variable, then firefox
> and mozilla accept the FormBean but with Konqueror and Safari the same
> error happen.
> 
> Does the struts markup <html:file /> function differently than the
> standard <input type=3D"file"> or does anyone have an idea how to use a
> struts download Action with velocity which work with all browsers.
> 
> Pierre
> 
> ---------------------------------------------------------------------
> 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