Hello, have you added the corresponding folder into src ?
On Wed, Jul 18, 2012 at 9:08 PM, G.Ben <[email protected]> wrote: > Hi All, > > i've been following a tutoriel and once entered this Java Code > public static String processMultiForm (HttpServletRequest request, > HttpServletResponse response){ > Collection parsed = UtilHttp.parseMultiFormData > (UtilHttp.getParameterMap(request)); > List combined = new ArrayList(); > Iterator parsedItr = parsed.iterator(); > while (parsedItr.hasNext()) { > Map record = (Map)parsedItr.next(); > combined.add(record.get("firstName") + " " + > record.get("lastName")); > } > request.setAttribute("combined", combined); > request.setAttribute("allParams", > UtilHttp.getParameterMap(request)); > request.setAttribute("submit", "Submitted"); > return "success"; > } > > with Eclipse IDE, it helped to recognise errors (about cast), I correct > them, > public static String processMultiForm (HttpServletRequest request, > HttpServletResponse response){ > Collection parsed = (Collection) > UtilHttp.parseMultiFormData > (UtilHttp.getParameterMap(request)); > List combined = (List) new ArrayList(); > Iterator parsedItr = (Iterator) > ((java.util.Collection<Map<String,Object>>) parsed).iterator(); > while (((java.util.Iterator<Map<String, > Object>>) > parsedItr).hasNext()) { > Map record = > (Map)((java.util.Iterator<Map<String, Object>>) > parsedItr).next(); > combined.add(record.get("firstName") + " " + > record.get("lastName")); > } > request.setAttribute("combined", combined); > request.setAttribute("allParams", > UtilHttp.getParameterMap(request)); > request.setAttribute("submit", "Submitted"); > return "success"; > } > however errors still remain. > Please can anyone give me the correct code that I should put > > Thank you so much for your help. > > Regards. > > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/Errors-with-JAava-code-in-OFBiz-tp4635012.html > Sent from the OFBiz - User mailing list archive at Nabble.com. >
