I don't use DynaForms, so I may be way off the mark, but in my ActionForms I
declare the file fields to be of type org.apache.struts.upload.FormFile. 

My understanding of local classes is that they can only be used by the
declaring class - is my understanding wrong?

Paul

> -----Original Message-----
> From: Kesavan, Malini [mailto:[EMAIL PROTECTED]
> Sent: 23 November 2004 20:36
> To: [EMAIL PROTECTED]
> Subject: File upload.
> Importance: High
> 
> 
> Hi,
> 
>             I am trying to implement file upload using struts.
> 
> I added the following to Dyna Validator Form:
> 
> <form-property name="importFile"
> type="org.apache.struts.upload.CommonsMultipartRequestHandler$
> CommonsFor
> mFile" />
> 
>  
> 
> Can anybody please let me know how can I get InputStream in my Action
> class.
> 
> Also, what do I need to import?
> 
>  
> 
>  
> 
>  
> 
> This is what I tried doing:
> 
> ....
> 
> ....
> 
>  
> 
> FormFile myFile = (FormFile)dynaValidatorform.get("importFile");
> 
> InputStream is = myFile.getInputStream();
> 
> ....
> 
> ....
> 
>  
> 
>  
> 
> I am getting this exception:
> 
>  
> 
> java.rmi.UnmarshalException: java.io.ByteArrayInputStream; nested
> exception is:
> 
>         java.io.NotSerializableException: java.io.ByteArrayInputStream
> 
>         at
> weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(Lweblogic.rm
> i.extensio
> ns.server.RemoteReference;Lweblogic.rmi.extensi
> 
> ons.server.RuntimeMethodDescriptor;[Ljava.lang.Object;Ljava.la
> ng.reflect
> .Method;)Ljava.lang.Object;(ReplicaAwareRemoteRef.java:297
> 
> )
> 
>  
> 
>  
> 
> Thanks,
> 
>  
> 
> Malini Kesavan
> 
> [EMAIL PROTECTED]
> 
> 404-498-1702
> 
> NCID/SRP 
> 
> CDC Information Technology Services (CITS)
> 
>  
> 
> 

Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you 
are not the addressee indicated in this message (or responsible for delivery of 
the message to such person), you may not copy or deliver this message to 
anyone. In such case, you should destroy this message, and notify us 
immediately. If you or your employer does not consent to Internet email 
messages of this kind, please advise us immediately. Opinions, conclusions and 
other information expressed in this message are not given or endorsed by my 
Company or employer unless otherwise indicated by an authorised representative 
independent of this message.
 
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being 
transmitted via electronic mail attachments we cannot guarantee that 
attachments do not contain computer virus code.  You are therefore strongly 
advised to undertake anti virus checks prior to accessing the attachment to 
this electronic mail.  Axios Systems Ltd grants no warranties regarding 
performance use or quality of any attachment and undertakes no liability for 
loss or damage howsoever caused.


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

Reply via email to