I have a page with a form in it like this: <form method="post" enctype="multipart/form-data" action="..."> <div><input type="file" name="file" size="50" /></div> <div><input type="file" name="file" size="50" /></div> <div><input type="file" name="file" size="50" /></div> <div><input type="file" name="file" size="50" /></div> <div><input type="file" name="file" size="50" /></div> <input type="submit" name="eventSubmit_doSessionUpload" value="Continue" /> </form>
I want to give my users the option of uploading anywhere from 0 to 5 files. What is happening though is that the UploadService dies unless I have every one of the forms filled in. I tried wandering through the rfc's to see if there was some reason that this should happen, but I couldn't find anything. I also hunted the list to see if anyone else was experiencing this and couldn't find anything either. I looked in the source and couldn't figure it out. The line numbers may be wrong, but in the cvs head the lines are: 944 String[] value = null; 945 Object object = parameters.get(convert(name)); 946 if (object != null) 947 value = ((String[]) object); There are only two puts into parameters and they are both String[]'s. The version I am using is 2.2 from the maven repository. Maybe it has been fixed in the interim. Has anyone else experienced an exception like: Exception: java.lang.ClassCastException Stack Trace follows: java.lang.ClassCastException at org.apache.turbine.util.parser.BaseValueParser.getStrings(BaseValueParser.java:947) at org.apache.turbine.util.parser.BaseValueParser.append(BaseValueParser.java:296) at org.apache.turbine.services.upload.TurbineUploadService.parseRequest(TurbineUploadService.java:210) at org.apache.turbine.services.upload.TurbineUpload.parseRequest(TurbineUpload.java:174) at org.apache.turbine.util.parser.DefaultParameterParser.setRequest(DefaultParameterParser.java:188) at org.apache.turbine.services.rundata.DefaultTurbineRunData.getParameters(DefaultTurbineRunData.java:493) at org.apache.turbine.Turbine.doGet(Turbine.java:472) at org.apache.turbine.Turbine.doPost(Turbine.java:658) Will --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
