> How do I get html:file value in Action class without using javascript?
 
> <html:file property="theFile" />

Have you looked at the struts-upload.jar in the Struts distribution zip
file? That's a full-functional file upload application, all the details of
using Struts to upload a file are there.

In a nutshell, you use <html:file ...> in your jsp page, you set
method="post" and enctype="multipart/form-data" in your <html:form...>
element, and you use an object of type org.apache.struts.upload.FormFile in
your ActionForm to receive the uploaded file. If you look up FormFile in the
Struts javadocs, you'll find that it has methods to give you all sorts of
information about the file, as well as an InputStream so you can read the
data. 


--
Tim Slattery
[EMAIL PROTECTED]


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

Reply via email to