You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chris Searle <ch...@ovitas.no> on 2006/11/28 10:06:30 UTC
Re: File upload using DynaActionForm/DynaValidatorForm
Mano Chinthaka Dasanayaka wrote:
> Hi,
> As per my knowledge Your Libraries are Ok...any way ,
> Have you set the
> <html:form action="/youraction" method="post"
> enctype="multipart/form-data">
I generate the form using velocity-tools support for struts rather than
JSP. The created form once displayed to the user has this html:
<form method="post" action="/admin/saveFile.do"
enctype="multipart/form-data">
<input type="text" size="30" name="title" id="title" value=""/>
<input type="text" size="30" name="revdate" id="revdate" value=""/>
<input type="text" size="30" name="revinfo" id="revinfo" value=""/>
<input type="file" size="30" name="manual" id="manual" value=""/>
<input type="submit" size="30" name="submit" id="submit" value="Save"/>
</form>
So - the action is correct, the method is post and the enctype is
multipart/form-data
If I understand the error log correctly - it is falling over when trying
to create an instance of the DynaValidatorForm to use for processing the
request - which makes me suspect that the error is either in the struts
form config xml or a missing dependency or similar.
--
Chris Searle
chris@ovitas.no
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org