[ https://issues.apache.org/jira/browse/WW-4534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Johannes Geppert closed WW-4534. -------------------------------- Resolution: Won't Fix Struts1 is EOL and not supported anymore. http://struts.apache.org/struts1eol-announcement.html For usage problems better ask on the user mailing list or stackoverflow to get help from other users and don't use the issue tracker. > Struts core 1.3.10 unable to submit single Form file > ---------------------------------------------------- > > Key: WW-4534 > URL: https://issues.apache.org/jira/browse/WW-4534 > Project: Struts 2 > Issue Type: Bug > Reporter: venu b > > My requirement is to support uploading multiple files at a time:- > Getting NPE while submitting Form file thru multipart form > In Java form I am not using > private FormFile [] importConfigFile > because, it throws > Exception found: java.lang.ClassCastException: > org.apache.struts.upload.CommonsMultipartRequestHandler$CommonsFormFile > cannot be cast to java.util.ArrayList > Hence, without declaring it, dynamically I am using > Hashtable files = > adminConfigurationsForm.getMultipartRequestHandler().getFileElements(); > ArrayList list = (ArrayList) files.get("importConfigFile"); > to accept multiple files at a time.. > ---------- > Same Action is working fine, if not File selected > ------------------------ > Caused by: java.lang.NullPointerException > at java.lang.Class.isAssignableFrom(Native Method) > at > org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506) > at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459) > at > org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50) > at > org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60) > at > org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) > at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191) > at > org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305) > at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191) > at > org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) > --------------- > Form parameters for failed scenarios: > import true > importConfigFile CustomTableEditor.xml > Headers (same for both cases) > POST /teams/do/ImportAdminConfigurations HTTP/1.1 > Content-Type multipart/form-data; > boundary=----WebKitFormBoundaryRJpECUJpEFbjAd5B > > Form parameters for failed scenarios: > import true > importConfigFile CustomTableEditor.xml, MetadataEditor.xml -- This message was sent by Atlassian JIRA (v6.3.4#6332)