struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry Lu <z...@umich.edu>
Subject Re: <html:file> tag and FormFile
Date Fri, 22 Feb 2002 12:45:24 GMT
Eddie, I figured out that it should be enctype instead of encType.
But I got another err:
javax.servlet.ServletException: MultipartIterator: no multipart request
data sent

Why? How to get rid of it?


---------------------------------------------------------------------------
Henry Lu
MCIT                                            phone: (734) 936-2063
University of Michigan Medical Center           fax:   (734) 763-4372

On Thu, 21 Feb 2002, Eddie Bush wrote:

> What does your html:form tag look like, Henry?  Be sure you specify
> encType="multipart/form-data" as an attribute to the html:form tag.  ex:
>
> <html:form action="/upload" encType="multipart/form-data">
> <html:file property="theFile"/>
> </html:form>
>
> I'm having an odd problem with mine hanging for some odd reason though - it
> just sits there now.  It DOES make it to the action however.  I just threw
> together a simple action that prints the file's contents.  I didn't think it
> was doing anything but it apprantly flushed the buffer when I killed the
> built-in tomcat server.  I got the entire file contents printed in my output
> window.
>
> HTH Henry!
>
> Eddie
>
>
> ----- Original Message -----
> From: "Henry Lu" <zhlu@umich.edu>
> To: "struts users" <struts-user@jakarta.apache.org>
> Sent: Thursday, February 21, 2002 2:53 PM
> Subject: <html:file> tag and FormFile
>
>
> > Is there any one who may help me to figure out how to use <html:file> rag
> > and FormFile in a ActionForm? I got errors where I tried to use both.
> > errors are:
> >
> > javax.servlet.ServletException: BeanUtils.populate
> > ....
> > Root Cause:
> > java.lang.IllegalArgumentException: argument type mismatch
> >
> > my JSP file has:
> >
> > <html:file property="myfile"/>
> >
> > and my ActionForm has:
> >
> > private FormFile myfile;
> >
> > // getter and setter
> >
> >
> >
> > --------------------------------------------------------------------------
> -
> > Henry Lu
> > MCIT                                            phone: (734) 936-2063
> > University of Michigan Medical Center           fax:   (734) 763-4372
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message