Re: javax.servlet.ServletException: BeanUtils.populate
Dear Li, Thank you for your help. You are right : I should have avoided using arrays. I decided to turn all of them to List, it is easier to add elements on them. I tried using your AutoList class, then I have less problems, but some exceptions remain. I will work on them tomorow, as I will go to cinema this evening :) Those exceptions are due to lacking setters and getters. I will let you know soon. Thanks a lot again ! :) Dom --- En date de : Sam 27.11.10, Li Ying liying.cn.2...@gmail.com a écrit : De: Li Ying liying.cn.2...@gmail.com Objet: Re: javax.servlet.ServletException: BeanUtils.populate À: Struts Users Mailing List user@struts.apache.org Date: Samedi 27 novembre 2010, 16h12 What happens when (1)liste is null or (2)liste is filled by null element or (3)index accessed is out of bound? 2010/11/27 Peter Nguyen pe...@peternguyen.id.au: Li, I think the issue is here is most likely point 3. When the form is submitted, I suspect struts is trying to call getListe(int) to retrieve a Personne bean before calling the respective setters. So in this case, Dominque probably just needs an additional getter in the action form that will return the required bean: public Personne getListe(int i) { return (Personne) liste[i]; } Peter. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: javax.servlet.ServletException: BeanUtils.populate
I think the reason of the Exception maybe: (1)the data you post is named like liste[0].nom (2)Struts1 accept this http param, and try to translate it to a form property, by using a lib named Apache Commons BeanUtils See: http://commons.apache.org/beanutils/ (3)BeanUtils treats nested property access likes liste[0].nom as some chained java method invokes, like: targetBean.getListe[0].setNome(someValue) (4-1)If you did not initialize the array liste, it will be a null, so of cause getListe will get a null, and then, getListe[0] should throw a NullPointException (4-2)If you initialized the array, but there is no item in it, then getListe[0] should throw an IndexOutOfBoundsException (4-3)If you initialized the array, but the items in it is null, then getListe[0] will get a null, and then setNome(someValue) should throw a NullPointException So, you should initialize the array, and items in it, before you can capture data posted from client side. Years ago, I meet the same problem. But I used List instead of array. So I created a new class named AutoList. When you call the get(index) method on it, it will create a new item instance if the item dose not exist yet. By using this AutoList, when BeanUtils try to invoke method likes getListe(0).setNome(someValue), the item instance will be created automatically if need. In your case, my suggest is: (1)use AutoList, instead of Array Or (2)Since you have done the array/item initialization in the the method setNom(int index , Personne nom), so you can use this method instead of getListe[0].setNome(someValue). Which mean, in html side, the data name should be nom[0] instead of liste[0].nom How ever, I recommend AutoList solution strongly, because I believe this is a very common problem in Struts1. You may meet it somewhere else, so AutoList class will be very convenient. And also, if you use AutoList, you don't have to change the data name on the html side, which means, you can use struts tag lib as normal. If you need this AutoList class, I can send it to you. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: javax.servlet.ServletException: BeanUtils.populate
I have dug it out from my old project. The code is not very beautiful, you can modify it if you wish, but please don't change the author information. Here is the code: package com.ewsoft.common.utils; import java.lang.reflect.Constructor; import java.util.ArrayList; import java.util.List; /** * A List class which can create items as need.br / * When method get(index) and add(index, element) is called,br / * and if there is no item in this index, item instances will be created * automatically to avoid a NullPointerException. * * @author Li Ying(liying.cn.2...@gmail.com) */ public class AutoListE extends Object extends ArrayListE { private ClassE elementClass; public AutoList(final ClassE elementClass) { super(); this.elementClass = elementClass; } private void ensureSize(final int size) { synchronized (this) { while (this.size() size) { add(createNewElement()); } } } private E createElementByConstructor() { try { ConstructorE[] constrArray = (ConstructorE[]) elementClass .getConstructors(); ConstructorE constructor = null; Class[] paramTypes = null; for (ConstructorE constr : constrArray) { if (constructor == null) { constructor = constr; paramTypes = constr.getParameterTypes(); } else if (constr.getParameterTypes().length paramTypes.length) { constructor = constr; paramTypes = constr.getParameterTypes(); } } List paramList = new ArrayList(); for (int i = 0; i paramTypes.length; i++) { paramList.add(null); } return constructor.newInstance(paramList.toArray()); } catch (Exception e) { return null; } } private E createNewElement() { return createElementByConstructor(); } /* * (non-Javadoc) * * @see java.util.ArrayList#get(int) */ @Override public final E get(final int index) { ensureSize(index + 1); return super.get(index); } /* * (non-Javadoc) * * @see java.util.ArrayList#add(int, java.lang.Object) */ @Override public final void add(final int index, final E element) { ensureSize(index); super.add(index, element); } } - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: javax.servlet.ServletException: BeanUtils.populate
The day after Black Friday and most folks are still at the WalMart so I'll take a stab at some testcases private E createElementByConstructor() { try { ConstructorE[] constrArray = (ConstructorE[]) elementClass .getConstructors(); ConstructorE constructor = null; Class[] paramTypes = null; for (ConstructorE constr : constrArray) { if (constructor == null) { /*this is executed first which is fine */ constructor = constr; paramTypes = constr.getParameterTypes(); /*constr ParameterType (Class) count (e.g. 0) is less than number of Classes stored in local var paramTypes (e.g. 1) */ } else if (constr.getParameterTypes().length paramTypes.length) { constructor = constr; paramTypes = constr.getParameterTypes(); } }/* Testcase execution 1st pass Class is Class1 with 1 parameter named fu*/ Class=Class1 parameter=fu Constructor is now Class1(fu) paramTypes.length is now 1 /* Testcase execution 2nd pass Class is Class2 with 0 parameters*/ Class=Class2 0 parameters so constr.getParameterTypes().length()==0 paramTypes 1 Constructor is now Class2(); paramTypes.length is now 0 /* Testcase execution 3rd pass Class is Class2 with 2 parameters parameter=fu and parameter=bar */ Class3 parameter fu, parameter barso constr.getParameterTypes().length()==2 paramTypes 0FAILS assignments to variables of constructor and paramTypes are bypassed Constructor is STILL Class2(); paramTypes.length is STILL 0 is this what you intend? Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Sat, 27 Nov 2010 18:26:11 +0900 Subject: Re: javax.servlet.ServletException: BeanUtils.populate From: liying.cn.2...@gmail.com To: user@struts.apache.org I have dug it out from my old project. The code is not very beautiful, you can modify it if you wish, but please don't change the author information. Here is the code: package com.ewsoft.common.utils; import java.lang.reflect.Constructor; import java.util.ArrayList; import java.util.List; /** * A List class which can create items as need.br / * When method get(index) and add(index, element) is called,br / * and if there is no item in this index, item instances will be created * automatically to avoid a NullPointerException. * * @author Li Ying(liying.cn.2...@gmail.com) */ public class AutoListE extends Object extends ArrayListE { private ClassE elementClass; public AutoList(final ClassE elementClass) { super(); this.elementClass = elementClass; } private void ensureSize(final int size) { synchronized (this) { while (this.size() size) { add(createNewElement()); } } } private E createElementByConstructor() { try { ConstructorE[] constrArray = (ConstructorE[]) elementClass .getConstructors(); ConstructorE constructor = null; Class[] paramTypes = null; for (ConstructorE constr : constrArray) { if (constructor == null) { constructor = constr; paramTypes = constr.getParameterTypes(); } else if (constr.getParameterTypes().length
Re: javax.servlet.ServletException: BeanUtils.populate
There will be only one class, which will be the class of the elements in the List. I just want to find the Constructor with the least parameters if there are more than one constructors for this class. Once I get the constructor, I can use it to create instance and append it to List automatically. This is the final purpose of the AutoList class. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: javax.servlet.ServletException: BeanUtils.populate
Li, I think the issue is here is most likely point 3. When the form is submitted, I suspect struts is trying to call getListe(int) to retrieve a Personne bean before calling the respective setters. So in this case, Dominque probably just needs an additional getter in the action form that will return the required bean: public Personne getListe(int i) { return (Personne) liste[i]; } Peter. -Original Message- From: Li Ying [mailto:liying.cn.2...@gmail.com] Sent: Saturday, 27 November 2010 7:28 PM To: Struts Users Mailing List Subject: Re: javax.servlet.ServletException: BeanUtils.populate I think the reason of the Exception maybe: (1)the data you post is named like liste[0].nom (2)Struts1 accept this http param, and try to translate it to a form property, by using a lib named Apache Commons BeanUtils See: http://commons.apache.org/beanutils/ (3)BeanUtils treats nested property access likes liste[0].nom as some chained java method invokes, like: targetBean.getListe[0].setNome(someValue) (4-1)If you did not initialize the array liste, it will be a null, so of cause getListe will get a null, and then, getListe[0] should throw a NullPointException (4-2)If you initialized the array, but there is no item in it, then getListe[0] should throw an IndexOutOfBoundsException (4-3)If you initialized the array, but the items in it is null, then getListe[0] will get a null, and then setNome(someValue) should throw a NullPointException So, you should initialize the array, and items in it, before you can capture data posted from client side. Years ago, I meet the same problem. But I used List instead of array. So I created a new class named AutoList. When you call the get(index) method on it, it will create a new item instance if the item dose not exist yet. By using this AutoList, when BeanUtils try to invoke method likes getListe(0).setNome(someValue), the item instance will be created automatically if need. In your case, my suggest is: (1)use AutoList, instead of Array Or (2)Since you have done the array/item initialization in the the method setNom(int index , Personne nom), so you can use this method instead of getListe[0].setNome(someValue). Which mean, in html side, the data name should be nom[0] instead of liste[0].nom How ever, I recommend AutoList solution strongly, because I believe this is a very common problem in Struts1. You may meet it somewhere else, so AutoList class will be very convenient. And also, if you use AutoList, you don't have to change the data name on the html side, which means, you can use struts tag lib as normal. If you need this AutoList class, I can send it to you. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: javax.servlet.ServletException: BeanUtils.populate
What happens when (1)liste is null or (2)liste is filled by null element or (3)index accessed is out of bound? 2010/11/27 Peter Nguyen pe...@peternguyen.id.au: Li, I think the issue is here is most likely point 3. When the form is submitted, I suspect struts is trying to call getListe(int) to retrieve a Personne bean before calling the respective setters. So in this case, Dominque probably just needs an additional getter in the action form that will return the required bean: public Personne getListe(int i) { return (Personne) liste[i]; } Peter. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: javax.servlet.ServletException: BeanUtils.populate
tdn:text property=prenom//td /tr /n:iterate tr td colspan=4n:submit value=Enregistrer//td /tr /table /n:form /body /h:html I thought I forgot the put the bean on session scope, but although I write it on struts-config.xml, nothing to do... form-beans form-bean name=pageForm type=bean.PageFormulaire/ /form-beans action-mappings action path=/traitement name=pageForm type=presentation.Traitement scope=session/ /action-mappings Note : class pathes are obviously correct :) So, does anyone have an idea ?... If necessary, I may send by mail the WAR files containing all Java sources. Thanks for your help. Sincerly, Dominique --- En date de : Jeu 25.11.10, Lukasz Lenart lukasz.len...@googlemail.com a écrit : De: Lukasz Lenart lukasz.len...@googlemail.com Objet: Re: javax.servlet.ServletException: BeanUtils.populate À: Struts Users Mailing List user@struts.apache.org Date: Jeudi 25 novembre 2010, 22h31 2010/11/25 Dominique JUSTE dju...@yahoo.com: Although I have used Struts for five years, I have been facing a trouble since Monday and I don't understand what's happening... Monday, monday ... manic monday... http://www.youtube.com/watch?v=lAZgLcK5LzI Kind regards ;-) -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: javax.servlet.ServletException: BeanUtils.populate
tdn:text property=nom//td tdPrénom/td tdn:text property=prenom//td /tr /n:iterate tr td colspan=4n:submit value=Enregistrer//td /tr /table /n:form /body /h:html I thought I forgot the put the bean on session scope, but although I write it on struts-config.xml, nothing to do... form-beans form-bean name=pageForm type=bean.PageFormulaire/ /form-beans action-mappings action path=/traitement name=pageForm type=presentation.Traitement scope=session/ /action-mappings Note : class pathes are obviously correct :) So, does anyone have an idea ?... If necessary, I may send by mail the WAR files containing all Java sources. Thanks for your help. Sincerly, Dominique --- En date de : Jeu 25.11.10, Lukasz Lenart lukasz.len...@googlemail.com a écrit : De: Lukasz Lenart lukasz.len...@googlemail.com Objet: Re: javax.servlet.ServletException: BeanUtils.populate À: Struts Users Mailing List user@struts.apache.org Date: Jeudi 25 novembre 2010, 22h31 2010/11/25 Dominique JUSTE dju...@yahoo.com: Although I have used Struts for five years, I have been facing a trouble since Monday and I don't understand what's happening... Monday, monday ... manic monday... http://www.youtube.com/watch?v=lAZgLcK5LzI Kind regards ;-) -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: javax.servlet.ServletException: BeanUtils.populate
Thank you Dave, Let me show you the generated HTML file : body table form name=pageForm method=post action=/EssaiA/traitement.do tr tdNom/td tdinput type=text name=liste[0].nom value=1/td tdPrénom/td tdinput type=text name=liste[0].prenom value=0/td /tr tr tdNom/td tdinput type=text name=liste[1].nom value=9/td tdPrénom/td tdinput type=text name=liste[1].prenom value=2/td /tr . /body We see the indexed liste (liste[0], liste[1], ...). So, what may I do to indicate that form contains an indexed property ? In which file(s) ? --- En date de : Ven 26.11.10, Dave Newton davelnew...@gmail.com a écrit : De: Dave Newton davelnew...@gmail.com Objet: Re: javax.servlet.ServletException: BeanUtils.populate À: Struts Users Mailing List user@struts.apache.org Cc: lukasz.len...@gmail.com Date: Vendredi 26 novembre 2010, 14h01 There's nothing in the form that indicates it's an indexed property/collection. On Fri, Nov 26, 2010 at 5:40 AM, Dominique JUSTE dju...@yahoo.com wrote: Hello all, Thanks a lot for your replies. As I'm French, I hope I will clearly expose my problem. It has been a long time since my last English draft. :) I've worked for one month on an application. It was created with Woody framework, which is no longer supported. Consequently my mission is to turn it to Struts. Work is almost completed, but there is one problem left, I've been trying fixing it since Monday but I can't do anything, I have a Beanutils exception :-((. The application is composed of MySQl 5.0, Hibernate 3.0 and Struts 1.3.10. My problem is on a formular, hence Struts. I have a two beans : - Personne (French translation of Character) with String attributs name and firstname, - PageFormulaire (extends ActionForm), with only one attribut, Personne[] listP. **I'm sure the exception is caused by this dynamic array.** If I put an unique bean in PageFormulaire, application perfectly works. Both beans have setters and getters but I created in PageFormulaire two more : - public void setNom(int index , Personne nom) - public Personne getNom(int index) An action instanciates a PageFormulaire bean, fills in with datas in MySQL, puts it in request then calls a JSP. That's OK, the formular appears with the datas. But when clicking submit button, application crashes, and shows this accursed exception : javax.servlet.ServletException: BeanUtils.populate org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) javax.servlet.ServletException: BeanUtils.populate org.apache.struts.util.RequestUtils.populate(RequestUtils.java:475) org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50) org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60) org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191) org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305) org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191) org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) java.lang.NullPointerException org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty(PropertyUtilsBean.java:505) org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty(PropertyUtilsBean.java:408) org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:760) org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:837) org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:903) org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:830) org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:433) org.apache.struts.util.RequestUtils.populate(RequestUtils.java
Re: javax.servlet.ServletException: BeanUtils.populate
Oh. I'm sorry, I completely missed the nested tags (not sure how I missed it, though :) Sorry for the confusion. Dave On Fri, Nov 26, 2010 at 8:29 AM, Dominique JUSTE dju...@yahoo.com wrote: Thank you Dave, Let me show you the generated HTML file : body table form name=pageForm method=post action=/EssaiA/traitement.do tr tdNom/td tdinput type=text name=liste[0].nom value=1/td tdPrénom/td tdinput type=text name=liste[0].prenom value=0/td /tr tr tdNom/td tdinput type=text name=liste[1].nom value=9/td tdPrénom/td tdinput type=text name=liste[1].prenom value=2/td /tr . /body We see the indexed liste (liste[0], liste[1], ...). So, what may I do to indicate that form contains an indexed property ? In which file(s) ? --- En date de : Ven 26.11.10, Dave Newton davelnew...@gmail.com a écrit : De: Dave Newton davelnew...@gmail.com Objet: Re: javax.servlet.ServletException: BeanUtils.populate À: Struts Users Mailing List user@struts.apache.org Cc: lukasz.len...@gmail.com Date: Vendredi 26 novembre 2010, 14h01 There's nothing in the form that indicates it's an indexed property/collection. On Fri, Nov 26, 2010 at 5:40 AM, Dominique JUSTE dju...@yahoo.com wrote: Hello all, Thanks a lot for your replies. As I'm French, I hope I will clearly expose my problem. It has been a long time since my last English draft. :) I've worked for one month on an application. It was created with Woody framework, which is no longer supported. Consequently my mission is to turn it to Struts. Work is almost completed, but there is one problem left, I've been trying fixing it since Monday but I can't do anything, I have a Beanutils exception :-((. The application is composed of MySQl 5.0, Hibernate 3.0 and Struts 1.3.10. My problem is on a formular, hence Struts. I have a two beans : - Personne (French translation of Character) with String attributs name and firstname, - PageFormulaire (extends ActionForm), with only one attribut, Personne[] listP. **I'm sure the exception is caused by this dynamic array.** If I put an unique bean in PageFormulaire, application perfectly works. Both beans have setters and getters but I created in PageFormulaire two more : - public void setNom(int index , Personne nom) - public Personne getNom(int index) An action instanciates a PageFormulaire bean, fills in with datas in MySQL, puts it in request then calls a JSP. That's OK, the formular appears with the datas. But when clicking submit button, application crashes, and shows this accursed exception : javax.servlet.ServletException: BeanUtils.populate org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) javax.servlet.ServletException: BeanUtils.populate org.apache.struts.util.RequestUtils.populate(RequestUtils.java:475) org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50) org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60) org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191) org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305) org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191) org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) java.lang.NullPointerException org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty(PropertyUtilsBean.java:505) org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty(PropertyUtilsBean.java:408) org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:760) org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:837) org.apache.commons.beanutils.BeanUtilsBean.setProperty
RE: javax.servlet.ServletException: BeanUtils.populate
who are the Bangles? Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 26 Nov 2010 10:55:58 -0500 Subject: Re: javax.servlet.ServletException: BeanUtils.populate From: davelnew...@gmail.com To: user@struts.apache.org Oh. I'm sorry, I completely missed the nested tags (not sure how I missed it, though :) Sorry for the confusion. Dave On Fri, Nov 26, 2010 at 8:29 AM, Dominique JUSTE dju...@yahoo.com wrote: Thank you Dave, Let me show you the generated HTML file : body table form name=pageForm method=post action=/EssaiA/traitement.do tr tdNom/td tdinput type=text name=liste[0].nom value=1/td tdPrénom/td tdinput type=text name=liste[0].prenom value=0/td /tr tr tdNom/td tdinput type=text name=liste[1].nom value=9/td tdPrénom/td tdinput type=text name=liste[1].prenom value=2/td /tr . /body We see the indexed liste (liste[0], liste[1], ...). So, what may I do to indicate that form contains an indexed property ? In which file(s) ? --- En date de : Ven 26.11.10, Dave Newton davelnew...@gmail.com a écrit : De: Dave Newton davelnew...@gmail.com Objet: Re: javax.servlet.ServletException: BeanUtils.populate À: Struts Users Mailing List user@struts.apache.org Cc: lukasz.len...@gmail.com Date: Vendredi 26 novembre 2010, 14h01 There's nothing in the form that indicates it's an indexed property/collection. On Fri, Nov 26, 2010 at 5:40 AM, Dominique JUSTE dju...@yahoo.com wrote: Hello all, Thanks a lot for your replies. As I'm French, I hope I will clearly expose my problem. It has been a long time since my last English draft. :) I've worked for one month on an application. It was created with Woody framework, which is no longer supported. Consequently my mission is to turn it to Struts. Work is almost completed, but there is one problem left, I've been trying fixing it since Monday but I can't do anything, I have a Beanutils exception :-((. The application is composed of MySQl 5.0, Hibernate 3.0 and Struts 1.3.10. My problem is on a formular, hence Struts. I have a two beans : - Personne (French translation of Character) with String attributs name and firstname, - PageFormulaire (extends ActionForm), with only one attribut, Personne[] listP. **I'm sure the exception is caused by this dynamic array.** If I put an unique bean in PageFormulaire, application perfectly works. Both beans have setters and getters but I created in PageFormulaire two more : - public void setNom(int index , Personne nom) - public Personne getNom(int index) An action instanciates a PageFormulaire bean, fills in with datas in MySQL, puts it in request then calls a JSP. That's OK, the formular appears with the datas. But when clicking submit button, application crashes, and shows this accursed exception : javax.servlet.ServletException: BeanUtils.populate org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) javax.servlet.ServletException: BeanUtils.populate org.apache.struts.util.RequestUtils.populate(RequestUtils.java:475) org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50) org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60) org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51
Re: javax.servlet.ServletException: BeanUtils.populate
No problem, Dave. Any idea about my problem ?... As I'm supposed to release this application on the 15th December, I'm getting worse... I found a solution, but I really want to understand my error. Thanks, Dom --- En date de : Ven 26.11.10, Dave Newton davelnew...@gmail.com a écrit : De: Dave Newton davelnew...@gmail.com Objet: Re: javax.servlet.ServletException: BeanUtils.populate À: Struts Users Mailing List user@struts.apache.org Date: Vendredi 26 novembre 2010, 16h55 Oh. I'm sorry, I completely missed the nested tags (not sure how I missed it, though :) Sorry for the confusion. Dave On Fri, Nov 26, 2010 at 8:29 AM, Dominique JUSTE dju...@yahoo.com wrote: Thank you Dave, Let me show you the generated HTML file : body table form name=pageForm method=post action=/EssaiA/traitement.do tr tdNom/td tdinput type=text name=liste[0].nom value=1/td tdPrénom/td tdinput type=text name=liste[0].prenom value=0/td /tr tr tdNom/td tdinput type=text name=liste[1].nom value=9/td tdPrénom/td tdinput type=text name=liste[1].prenom value=2/td /tr . /body We see the indexed liste (liste[0], liste[1], ...). So, what may I do to indicate that form contains an indexed property ? In which file(s) ? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: javax.servlet.ServletException: BeanUtils.populate
Hello Martin, What do you mean ? --- En date de : Ven 26.11.10, Martin Gainty mgai...@hotmail.com a écrit : De: Martin Gainty mgai...@hotmail.com Objet: RE: javax.servlet.ServletException: BeanUtils.populate À: Struts Users Mailing List user@struts.apache.org Date: Vendredi 26 novembre 2010, 17h50 who are the Bangles? Martin - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: javax.servlet.ServletException: BeanUtils.populate
Susanna Hoffs – vocals/guitars Vicki Peterson – vocals/guitars/bass guitar Debbi Peterson – vocals/drums/bass guitar Annette Zilinskas – vocals/bass guitar (1982–1983) Michael Steele – vocals/bass guitar/guitars (1983–2005) Did I win something? 2010/11/26 Martin Gainty mgai...@hotmail.com: who are the Bangles? Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 26 Nov 2010 10:55:58 -0500 Subject: Re: javax.servlet.ServletException: BeanUtils.populate From: davelnew...@gmail.com To: user@struts.apache.org Oh. I'm sorry, I completely missed the nested tags (not sure how I missed it, though :) Sorry for the confusion. Dave On Fri, Nov 26, 2010 at 8:29 AM, Dominique JUSTE dju...@yahoo.com wrote: Thank you Dave, Let me show you the generated HTML file : body table form name=pageForm method=post action=/EssaiA/traitement.do tr tdNom/td tdinput type=text name=liste[0].nom value=1/td tdPrénom/td tdinput type=text name=liste[0].prenom value=0/td /tr tr tdNom/td tdinput type=text name=liste[1].nom value=9/td tdPrénom/td tdinput type=text name=liste[1].prenom value=2/td /tr . /body We see the indexed liste (liste[0], liste[1], ...). So, what may I do to indicate that form contains an indexed property ? In which file(s) ? --- En date de : Ven 26.11.10, Dave Newton davelnew...@gmail.com a écrit : De: Dave Newton davelnew...@gmail.com Objet: Re: javax.servlet.ServletException: BeanUtils.populate À: Struts Users Mailing List user@struts.apache.org Cc: lukasz.len...@gmail.com Date: Vendredi 26 novembre 2010, 14h01 There's nothing in the form that indicates it's an indexed property/collection. On Fri, Nov 26, 2010 at 5:40 AM, Dominique JUSTE dju...@yahoo.com wrote: Hello all, Thanks a lot for your replies. As I'm French, I hope I will clearly expose my problem. It has been a long time since my last English draft. :) I've worked for one month on an application. It was created with Woody framework, which is no longer supported. Consequently my mission is to turn it to Struts. Work is almost completed, but there is one problem left, I've been trying fixing it since Monday but I can't do anything, I have a Beanutils exception :-((. The application is composed of MySQl 5.0, Hibernate 3.0 and Struts 1.3.10. My problem is on a formular, hence Struts. I have a two beans : - Personne (French translation of Character) with String attributs name and firstname, - PageFormulaire (extends ActionForm), with only one attribut, Personne[] listP. **I'm sure the exception is caused by this dynamic array.** If I put an unique bean in PageFormulaire, application perfectly works. Both beans have setters and getters but I created in PageFormulaire two more : - public void setNom(int index , Personne nom) - public Personne getNom(int index) An action instanciates a PageFormulaire bean, fills in with datas in MySQL, puts it in request then calls a JSP. That's OK, the formular appears with the datas. But when clicking submit button, application crashes, and shows this accursed exception : javax.servlet.ServletException: BeanUtils.populate org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) javax.servlet.ServletException: BeanUtils.populate org.apache.struts.util.RequestUtils.populate(RequestUtils.java:475
RE: javax.servlet.ServletException: BeanUtils.populate
you've listed 5 people who are more well known than Tim Berners-Lee Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 26 Nov 2010 18:15:23 +0100 Subject: Re: javax.servlet.ServletException: BeanUtils.populate From: maurizio.cucchi...@gmail.com To: user@struts.apache.org Susanna Hoffs – vocals/guitars Vicki Peterson – vocals/guitars/bass guitar Debbi Peterson – vocals/drums/bass guitar Annette Zilinskas – vocals/bass guitar (1982–1983) Michael Steele – vocals/bass guitar/guitars (1983–2005) Did I win something? 2010/11/26 Martin Gainty mgai...@hotmail.com: who are the Bangles? Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 26 Nov 2010 10:55:58 -0500 Subject: Re: javax.servlet.ServletException: BeanUtils.populate From: davelnew...@gmail.com To: user@struts.apache.org Oh. I'm sorry, I completely missed the nested tags (not sure how I missed it, though :) Sorry for the confusion. Dave On Fri, Nov 26, 2010 at 8:29 AM, Dominique JUSTE dju...@yahoo.com wrote: Thank you Dave, Let me show you the generated HTML file : body table form name=pageForm method=post action=/EssaiA/traitement.do tr tdNom/td tdinput type=text name=liste[0].nom value=1/td tdPrénom/td tdinput type=text name=liste[0].prenom value=0/td /tr tr tdNom/td tdinput type=text name=liste[1].nom value=9/td tdPrénom/td tdinput type=text name=liste[1].prenom value=2/td /tr . /body We see the indexed liste (liste[0], liste[1], ...). So, what may I do to indicate that form contains an indexed property ? In which file(s) ? --- En date de : Ven 26.11.10, Dave Newton davelnew...@gmail.com a écrit : De: Dave Newton davelnew...@gmail.com Objet: Re: javax.servlet.ServletException: BeanUtils.populate À: Struts Users Mailing List user@struts.apache.org Cc: lukasz.len...@gmail.com Date: Vendredi 26 novembre 2010, 14h01 There's nothing in the form that indicates it's an indexed property/collection. On Fri, Nov 26, 2010 at 5:40 AM, Dominique JUSTE dju...@yahoo.com wrote: Hello all, Thanks a lot for your replies. As I'm French, I hope I will clearly expose my problem. It has been a long time since my last English draft. :) I've worked for one month on an application. It was created with Woody framework, which is no longer supported. Consequently my mission is to turn it to Struts. Work is almost completed, but there is one problem left, I've been trying fixing it since Monday but I can't do anything, I have a Beanutils exception :-((. The application is composed of MySQl 5.0, Hibernate 3.0 and Struts 1.3.10. My problem is on a formular, hence Struts. I have a two beans : - Personne (French
Re: javax.servlet.ServletException: BeanUtils.populate
you've listed 5 people who are more well known than Tim Berners-Lee Who the hell is TimBL? Wait... I know is a member of genesis 2010/11/26 Martin Gainty mgai...@hotmail.com: -- Maurizio Cucchiara - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: javax.servlet.ServletException: BeanUtils.populate
Are the Bangles Struts expert ?... Are they as skilled in Struts as singing ?... :) --- En date de : Ven 26.11.10, Martin Gainty mgai...@hotmail.com a écrit : De: Martin Gainty mgai...@hotmail.com Objet: RE: javax.servlet.ServletException: BeanUtils.populate À: Struts Users Mailing List user@struts.apache.org Date: Vendredi 26 novembre 2010, 18h34 you've listed 5 people who are more well known than Tim Berners-Lee Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 26 Nov 2010 18:15:23 +0100 Subject: Re: javax.servlet.ServletException: BeanUtils.populate From: maurizio.cucchi...@gmail.com To: user@struts.apache.org Susanna Hoffs – vocals/guitars Vicki Peterson – vocals/guitars/bass guitar Debbi Peterson – vocals/drums/bass guitar Annette Zilinskas – vocals/bass guitar (1982–1983) Michael Steele – vocals/bass guitar/guitars (1983–2005) Did I win something? 2010/11/26 Martin Gainty mgai...@hotmail.com: who are the Bangles? Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 26 Nov 2010 10:55:58 -0500 Subject: Re: javax.servlet.ServletException: BeanUtils.populate From: davelnew...@gmail.com To: user@struts.apache.org Oh. I'm sorry, I completely missed the nested tags (not sure how I missed it, though :) Sorry for the confusion. Dave On Fri, Nov 26, 2010 at 8:29 AM, Dominique JUSTE dju...@yahoo.com wrote: Thank you Dave, Let me show you the generated HTML file : body table form name=pageForm method=post action=/EssaiA/traitement.do tr tdNom/td tdinput type=text name=liste[0].nom value=1/td tdPrénom/td tdinput type=text name=liste[0].prenom value=0/td /tr tr tdNom/td tdinput type=text name=liste[1].nom value=9/td tdPrénom/td tdinput type=text name=liste[1].prenom value=2/td /tr . /body We see the indexed liste (liste[0], liste[1], ...). So, what may I do to indicate that form contains an indexed property ? In which file(s) ? --- En date de : Ven 26.11.10, Dave Newton davelnew...@gmail.com a écrit : De: Dave Newton davelnew...@gmail.com Objet: Re: javax.servlet.ServletException: BeanUtils.populate À: Struts Users Mailing List user@struts.apache.org Cc: lukasz.len...@gmail.com Date: Vendredi 26 novembre 2010, 14h01 There's nothing in the form that indicates it's an indexed property/collection. On Fri, Nov 26, 2010 at 5:40 AM, Dominique JUSTE dju...@yahoo.com wrote: Hello all, Thanks a lot for your replies. As I'm French, I hope I will clearly expose my problem. It has been a long time since my last English draft. :) I've worked for one month on an application. It was created
Re: javax.servlet.ServletException: BeanUtils.populate
Just a guy who had a cool idea once ... the web (easily googled for details). Brian Sent via my Droid, Eka. On Nov 26, 2010 11:53 AM, Maurizio Cucchiara maurizio.cucchi...@gmail.com wrote: you've listed 5 people who are more well known than Tim Berners-Lee Who the hell is TimBL? Wait... I know is a member of genesis 2010/11/26 Martin Gainty mgai...@hotmail.com: -- Maurizio Cucchiara - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: javax.servlet.ServletException: BeanUtils.populate
Lol. Guys you're not serious about not knowing who Tim Berners Lee is ?! :D Roger, what does your form bean look like? How have you backed your indexed property? Peter. -Original Message- From: Dominique JUSTE [mailto:dju...@yahoo.com] Sent: Saturday, 27 November 2010 4:54 AM To: Struts Users Mailing List Subject: RE: javax.servlet.ServletException: BeanUtils.populate Are the Bangles Struts expert ?... Are they as skilled in Struts as singing ?... :) --- En date de : Ven 26.11.10, Martin Gainty mgai...@hotmail.com a écrit : De: Martin Gainty mgai...@hotmail.com Objet: RE: javax.servlet.ServletException: BeanUtils.populate À: Struts Users Mailing List user@struts.apache.org Date: Vendredi 26 novembre 2010, 18h34 you've listed 5 people who are more well known than Tim Berners-Lee Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 26 Nov 2010 18:15:23 +0100 Subject: Re: javax.servlet.ServletException: BeanUtils.populate From: maurizio.cucchi...@gmail.com To: user@struts.apache.org Susanna Hoffs – vocals/guitars Vicki Peterson – vocals/guitars/bass guitar Debbi Peterson – vocals/drums/bass guitar Annette Zilinskas – vocals/bass guitar (1982–1983) Michael Steele – vocals/bass guitar/guitars (1983–2005) Did I win something? 2010/11/26 Martin Gainty mgai...@hotmail.com: who are the Bangles? Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 26 Nov 2010 10:55:58 -0500 Subject: Re: javax.servlet.ServletException: BeanUtils.populate From: davelnew...@gmail.com To: user@struts.apache.org Oh. I'm sorry, I completely missed the nested tags (not sure how I missed it, though :) Sorry for the confusion. Dave On Fri, Nov 26, 2010 at 8:29 AM, Dominique JUSTE dju...@yahoo.com wrote: Thank you Dave, Let me show you the generated HTML file : body table form name=pageForm method=post action=/EssaiA/traitement.do tr tdNom/td tdinput type=text name=liste[0].nom value=1/td tdPrénom/td tdinput type=text name=liste[0].prenom value=0/td /tr tr tdNom/td tdinput type=text name=liste[1].nom value=9/td tdPrénom/td tdinput type=text name=liste[1].prenom value=2/td /tr . /body We see the indexed liste (liste[0], liste[1], ...). So, what may I do to indicate that form contains an indexed property ? In which file(s) ? --- En date de : Ven 26.11.10, Dave Newton davelnew...@gmail.com a écrit : De: Dave Newton davelnew...@gmail.com Objet: Re: javax.servlet.ServletException: BeanUtils.populate À: Struts Users Mailing List user@struts.apache.org Cc: lukasz.len...@gmail.com Date: Vendredi 26 novembre 2010, 14h01 There's nothing in the form that indicates it's an indexed
RE: javax.servlet.ServletException: BeanUtils.populate
Hello Peter, Thanks for your reply. You may download the project at this URL : http://athe.pagesperso-orange.fr/EssaiA.zip zip file contains Java sources in /WEB-INF/src :-) you will find a small part of the real project, this one is very big. Here's the form bean : package bean; import org.apache.struts.action.ActionForm; public class PageFormulaire extends ActionForm { /** * */ private static final long serialVersionUID = 1L; private Personne liste[]; public Personne[] getListe() { return liste; } public void setListe(Personne[] liste) { this.liste = liste; } public void setNom(int index , Personne nom) { if (liste == null) liste = new Personne[index + 1]; if (liste.length = index) { Personne[] t = new Personne[index + 1]; int i = 0; while (i liste.length) { t[i] = liste[i]; i++; } liste = t; } liste[index] = nom; } public Personne getNom(int index) { if (liste == null) liste = new Personne[index + 1]; if (liste.length = index) { Personne[] t = new Personne[index + 1]; int i = 0; while (i liste.length) { t[i] = liste[i]; i++; } liste = t; } return liste[index]; } } Here's Personne bean : package bean; import org.apache.struts.action.ActionForm; public class Personne extends ActionForm { /** * */ private static final long serialVersionUID = 1L; private String nom; private String prenom; public String getNom() { return nom; } public void setNom(String nom) { this.nom = nom; } public String getPrenom() { return prenom; } public void setPrenom(String prenom) { this.prenom = prenom; } } Thanks, Dom --- En date de : Sam 27.11.10, Peter Nguyen pe...@peternguyen.id.au a écrit : De: Peter Nguyen pe...@peternguyen.id.au Objet: RE: javax.servlet.ServletException: BeanUtils.populate À: 'Struts Users Mailing List' user@struts.apache.org Date: Samedi 27 novembre 2010, 0h05 Lol. Guys you're not serious about not knowing who Tim Berners Lee is ?! :D Roger, what does your form bean look like? How have you backed your indexed property? Peter. -Original Message- From: Dominique JUSTE [mailto:dju...@yahoo.com] Sent: Saturday, 27 November 2010 4:54 AM To: Struts Users Mailing List Subject: RE: javax.servlet.ServletException: BeanUtils.populate Are the Bangles Struts expert ?... Are they as skilled in Struts as singing ?... :) --- En date de : Ven 26.11.10, Martin Gainty mgai...@hotmail.com a écrit : De: Martin Gainty mgai...@hotmail.com Objet: RE: javax.servlet.ServletException: BeanUtils.populate À: Struts Users Mailing List user@struts.apache.org Date: Vendredi 26 novembre 2010, 18h34 you've listed 5 people who are more well known than Tim Berners-Lee Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 26 Nov 2010 18:15:23 +0100 Subject: Re: javax.servlet.ServletException: BeanUtils.populate From: maurizio.cucchi...@gmail.com To: user@struts.apache.org Susanna Hoffs – vocals/guitars Vicki Peterson – vocals/guitars/bass guitar Debbi Peterson – vocals/drums/bass guitar Annette Zilinskas – vocals/bass guitar
Re: javax.servlet.ServletException: BeanUtils.populate
If it's Struts-related, sure. Dave On Thu, Nov 25, 2010 at 4:05 PM, Dominique JUSTE dju...@yahoo.com wrote: Hello all, Although I have used Struts for five years, I have been facing a trouble since Monday and I don't understand what's happening... So may I ask for some help in this mailing list ?... I rather prefer asking before drafting a long mail. :) Sincerly, Dominique French Web developper - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: javax.servlet.ServletException: BeanUtils.populate
2010/11/25 Dominique JUSTE dju...@yahoo.com: Although I have used Struts for five years, I have been facing a trouble since Monday and I don't understand what's happening... Monday, monday ... manic monday... http://www.youtube.com/watch?v=lAZgLcK5LzI Kind regards ;-) -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org