You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by john cho <ch...@comcast.net> on 2004/10/05 21:23:22 UTC

FormFile Casting problem

Hi,
I did read in File using StrutsForm bean and put that into the HashMap.   Now, when I try to get it out of the hashMap with

like,
1.  FormFile file = (FormFile)uploadForm.get("uploadedFile")
2.  HashMap map = new HashMap(2);
3.  map.put("uploadedFile", file);
4.  FormFile file = (FormFile)hashMap.get("uploadedFile);

Now, it works fine in window environment, but once I did move the code to Linux side, it throws ClassCastException.   your comments would be appreciated.

thanks in advance.

John