RE: log4j configurations?
Just put log4j.properties into your JavaSource directory and Exadel put it automatically after a compile/build session. It will be put into the WEB-INF/classes, which means that it will be found on your classpath. Cheers Urso -Oorspronkelijk bericht- Van: Mallik [mailto:[EMAIL PROTECTED] Verzonden: woensdag 13 december 2006 13:04 Aan: user@struts.apache.org Onderwerp: log4j configurations? Hi friends i am working on struts in Exadel studio i am getting the error: -- log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.ConvertUtils). log4j:WARN Please initialize the log4j system properly. --- i go through google and every where saying that add log4j.properties to classpath but i don't know how to add to classpath in exadel studio please let me know how to overcome this problem thanks in advance ur's Mallik -- View this message in context: http://www.nabble.com/log4j-configurations--tf2813547.html#a7851592 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: Struts1: CHALLENGE Indexed Properties can not be used with FORMS on REQUEST scope! TRUE or NOT TRUE?
Hi folks, Unfortunately I have not got any reactions about my statement yet? I really would like to hear some views on this matter. Kind Regards Urso Wieske -Oorspronkelijk bericht- Van: Urso Wieske Verzonden: donderdag 7 december 2006 14:11 Aan: 'Struts Users Mailing List' Onderwerp: Struts1: CHALLENGE Indexed Properties can not be used with FORMS on REQUEST scope! TRUE or NOT TRUE? Hi folks, Very low reactions on my posting about indexed properties, form, beanutils and request scope. I therefore impose the following CHALLENGE STATEMENT: Indexed Properties can not be used with FORMS on REQUEST scope! I am curious to know who is able to support or reject this statement, beceause until now I was not able do implement this scenario without exceptions. Ted Husted: I would really like your view on the above... :-) Kind regards Urso Wieske - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts1: Indexed Properties, BeanUtils populate, Form on REQUEST scope
Hi Niall, Thanks for the reply! Apparantly this problem is quite difficult to get answer upon. You're the only one until now. Well, I was getting different exception in different scenario. - When I put an array initialization (someWrappers = )in myForm's default constructor, I would get Array Out Of Bound exceptions. - When I don't do an array initialization for myForm (on REQUEST scope), I would get a method invocation exception from BeanUtils.poulate() due to some getter property descriptor that can't be found. (?) But I have declared all my getters and setters (see fot your self below). I checked my generated HTML sources (from JSP), but they are all rendered as expected. That is, like you have specified below. Weird, huh? When I chang my scope to session... it seems to work. But I don't want my form in sessin scope. (And if this is working indeed in session scope why not for requests scope?) The solution that you propose... I have seen it too on the internet. But this solution does not guarantee the right order of the array elements. And order IS a Requirement for my problem area. Any hints? Kind regards, Urso Wieske -Oorspronkelijk bericht- Van: Niall Pemberton [mailto:[EMAIL PROTECTED] Verzonden: donderdag 7 december 2006 9:40 Aan: Struts Users Mailing List Onderwerp: Re: Struts1: Indexed Properties, BeanUtils populate, Form on REQUEST scope So what BeanUtils exception are you getting? Your jsp should be generating the following? input type=.. name=someWrapper[0].propA ... input type=.. name=someWrapper[1].propA ... BeanUtils will try and access the indexed getter - getSomeWrapper(0) and then call setPropA(...) - presumably its one of these methods ist having problems with? Anyway the problem usually with request scope beans is that when it calls the getSomeWrapper(index) method the array isn't initialized and it returns null - if you put logic to automatically grow your array in the getSomeWrapper(index) method then it should solve this. Niall On 12/6/06, Urso Wieske [EMAIL PROTECTED] wrote: Hi folks, I have problem with the scenario Indexed Properties, BeanUtils and Form on REQUEST scope. When I select a a value from (1 or 2) from the dropdownlist and submit the form, I get an exception from BeanUtils.populate method about some getter which can be found!?? IF change the scope of myForm to Session in my struts configuration, then I don't have a problem with beanutils. But I want my form on request scope! I have described below my problem scenario. Is there a solution to this problem?? (form on request scope) I have looked in diffenrent aspects but I am not sure what is happening here with BeanUtils: - commons BeanUtil JAR version issue? - scope (request/session) issue? - JRE/Beanutil issue? - program issue of in my scenario? - array issue? Thanks Urso Wieske Scenario abstraction of my problem: 1.PrepareAction/myForm {forward} 2.viewJSP -{submit}--- 3.ProcessAction/myForm Action Mapping Configuration relevant settings: 1) myForm (MyForm class) is on request scope 3) myForm(MyForm class) is on request scope MyForm considerations: I have a property someWrappers of type array of SomeWrapper (thus, not a List type!) properties: - SomeWrapper [] getSomeWrappers() { return someWrappers;} - void getSomeWrappers(SomeWrapper [] someWrapper) {this.someWrappers = someWrapper;} - SomeWrapper getSomeWrapper(int index) {return someWrappers[index];} - void setSomeWrapper(int index, SomeWrapper someWrapper) {this.someWrappers[index] = someWrapper;} I have changed the name of the indexed property from plural to single noun (someWrapper,... to bypass the JRE1.3/1.4 - JavaBeans specs - BeanUtils issue. My Target runtime is JRE5. viewJSP is a JSP file which has the following structure: html:form action=/someAction . logic:notEmpty name=myForm property=someWrappers logic:iterate property=someWrappers id=someWrapper html:select name=someWrapper property=propA indexed=true html:option value=11/html:option html:option value=22/html:option /html:select logic:iterate /logic:notEmpty . /html:form - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts1: CHALLENGE Indexed Properties can not be used with FORMS on REQUEST scope! TRUE or NOT TRUE?
Hi folks, Very low reactions on my posting about indexed properties, form, beanutils and request scope. I therefore impose the following CHALLENGE STATEMENT: Indexed Properties can not be used with FORMS on REQUEST scope! I am curious to know who is able to support or reject this statement, beceause until now I was not able do implement this scenario without exceptions. Ted Husted: I would really like your view on the above... :-) Kind regards Urso Wieske - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts1: Indexed Properties, BeanUtils populate, Form on REQUEST scope
I completely agree with you about how HTTP handles requestparameter. If this is the only solution, then I will have to do some reengineering work in my porblem area to deal with ordering. :-( This is really annoying. I can't imagine I am the first person with this problem. I don;t really see the problem with Struts handling this issue. At form creation/instantiation time by Struts framwork, you always know the amount of indexed parameters. You just count them! :-) So, you the size of the array to be created. The only thing left to do is to put the elements in their proper order. Example: RequestString on submit . someWrapper[0].name=blabla1someWrapper[1].name=blabla2someWrapper[2].name=blabla3.. Voila, you have created a array of size 3, because there three occurrences of indexed property someWrapper[x].name. Kind Regards, Urso -Oorspronkelijk bericht- Van: Niall Pemberton [mailto:[EMAIL PROTECTED] Verzonden: donderdag 7 december 2006 14:16 Aan: Struts Users Mailing List Onderwerp: Re: Struts1: Indexed Properties, BeanUtils populate, Form on REQUEST scope On 12/7/06, Urso Wieske [EMAIL PROTECTED] wrote: Hi Niall, Thanks for the reply! Apparantly this problem is quite difficult to get answer upon. You're the only one until now. Well, I was getting different exception in different scenario. - When I put an array initialization (someWrappers = )in myForm's default constructor, I would get Array Out Of Bound exceptions. - When I don't do an array initialization for myForm (on REQUEST scope), I would get a method invocation exception from BeanUtils.poulate() due to some getter property descriptor that can't be found. (?) But I have declared all my getters and setters (see fot your self below). I checked my generated HTML sources (from JSP), but they are all rendered as expected. That is, like you have specified below. Weird, huh? When I chang my scope to session... it seems to work. But I don't want my form in sessin scope. (And if this is working indeed in session scope why not for requests scope?) The solution that you propose... I have seen it too on the internet. But this solution does not guarantee the right order of the array elements. And order IS a Requirement for my problem area. You can't control which order http sends the request parameters in - but theres no reason why you can't just grow your array to cope with whatever size the indexed getter is asking for. public SomeWrapper getSomeWrapper(int index) { if (wrappers == null) { wrappers = new SomeWrapper[index + 1]; } // Grow the array if (wrappers.length index + 1) { newWrappers = new SomeWrapper[index + 1]; System.arraycopy(wrappers, 0, newWrappers, 0, wrappers.length); wrappers = newWrappers; } if (wrappers[index] == null) { wrappers[index] = new SomeWrapper(); } return wrappers[index]; } LazyDynaBeans do this for you: http://struts.apache.org/1.x/userGuide/building_controller.html#lazy_action_form_classes Also more info on lazy index growth is here on the wiki: http://wiki.apache.org/struts/StrutsCatalogLazyList Niall Any hints? Kind regards, Urso Wieske -Oorspronkelijk bericht- Van: Niall Pemberton [mailto:[EMAIL PROTECTED] Verzonden: donderdag 7 december 2006 9:40 Aan: Struts Users Mailing List Onderwerp: Re: Struts1: Indexed Properties, BeanUtils populate, Form on REQUEST scope So what BeanUtils exception are you getting? Your jsp should be generating the following? input type=.. name=someWrapper[0].propA ... input type=.. name=someWrapper[1].propA ... BeanUtils will try and access the indexed getter - getSomeWrapper(0) and then call setPropA(...) - presumably its one of these methods ist having problems with? Anyway the problem usually with request scope beans is that when it calls the getSomeWrapper(index) method the array isn't initialized and it returns null - if you put logic to automatically grow your array in the getSomeWrapper(index) method then it should solve this. Niall On 12/6/06, Urso Wieske [EMAIL PROTECTED] wrote: Hi folks, I have problem with the scenario Indexed Properties, BeanUtils and Form on REQUEST scope. When I select a a value from (1 or 2) from the dropdownlist and submit the form, I get an exception from BeanUtils.populate method about some getter which can be found!?? IF change the scope of myForm to Session in my struts configuration, then I don't have a problem with beanutils. But I want my form on request scope! I have described below my problem scenario. Is there a solution to this problem?? (form on request scope) I have looked in diffenrent aspects but I am not sure what is happening here with BeanUtils: - commons BeanUtil JAR version issue? - scope (request/session) issue? - JRE/Beanutil issue? - program issue of in my scenario
RE: Struts1: Indexed Properties, BeanUtils populate, Form on REQUEST scope
Guys, Girls, Help. -Oorspronkelijk bericht- Van: Urso Wieske Verzonden: donderdag 7 december 2006 14:29 Aan: Struts Users Mailing List Onderwerp: RE: Struts1: Indexed Properties, BeanUtils populate, Form on REQUEST scope I completely agree with you about how HTTP handles requestparameter. If this is the only solution, then I will have to do some reengineering work in my porblem area to deal with ordering. :-( This is really annoying. I can't imagine I am the first person with this problem. I don;t really see the problem with Struts handling this issue. At form creation/instantiation time by Struts framwork, you always know the amount of indexed parameters. You just count them! :-) So, you the size of the array to be created. The only thing left to do is to put the elements in their proper order. Example: RequestString on submit . someWrapper[0].name=blabla1someWrapper[1].name=blabla2someWrapper[2].name=blabla3.. Voila, you have created a array of size 3, because there three occurrences of indexed property someWrapper[x].name. Kind Regards, Urso -Oorspronkelijk bericht- Van: Niall Pemberton [mailto:[EMAIL PROTECTED] Verzonden: donderdag 7 december 2006 14:16 Aan: Struts Users Mailing List Onderwerp: Re: Struts1: Indexed Properties, BeanUtils populate, Form on REQUEST scope On 12/7/06, Urso Wieske [EMAIL PROTECTED] wrote: Hi Niall, Thanks for the reply! Apparantly this problem is quite difficult to get answer upon. You're the only one until now. Well, I was getting different exception in different scenario. - When I put an array initialization (someWrappers = )in myForm's default constructor, I would get Array Out Of Bound exceptions. - When I don't do an array initialization for myForm (on REQUEST scope), I would get a method invocation exception from BeanUtils.poulate() due to some getter property descriptor that can't be found. (?) But I have declared all my getters and setters (see fot your self below). I checked my generated HTML sources (from JSP), but they are all rendered as expected. That is, like you have specified below. Weird, huh? When I chang my scope to session... it seems to work. But I don't want my form in sessin scope. (And if this is working indeed in session scope why not for requests scope?) The solution that you propose... I have seen it too on the internet. But this solution does not guarantee the right order of the array elements. And order IS a Requirement for my problem area. You can't control which order http sends the request parameters in - but theres no reason why you can't just grow your array to cope with whatever size the indexed getter is asking for. public SomeWrapper getSomeWrapper(int index) { if (wrappers == null) { wrappers = new SomeWrapper[index + 1]; } // Grow the array if (wrappers.length index + 1) { newWrappers = new SomeWrapper[index + 1]; System.arraycopy(wrappers, 0, newWrappers, 0, wrappers.length); wrappers = newWrappers; } if (wrappers[index] == null) { wrappers[index] = new SomeWrapper(); } return wrappers[index]; } LazyDynaBeans do this for you: http://struts.apache.org/1.x/userGuide/building_controller.html#lazy_action_form_classes Also more info on lazy index growth is here on the wiki: http://wiki.apache.org/struts/StrutsCatalogLazyList Niall Any hints? Kind regards, Urso Wieske -Oorspronkelijk bericht- Van: Niall Pemberton [mailto:[EMAIL PROTECTED] Verzonden: donderdag 7 december 2006 9:40 Aan: Struts Users Mailing List Onderwerp: Re: Struts1: Indexed Properties, BeanUtils populate, Form on REQUEST scope So what BeanUtils exception are you getting? Your jsp should be generating the following? input type=.. name=someWrapper[0].propA ... input type=.. name=someWrapper[1].propA ... BeanUtils will try and access the indexed getter - getSomeWrapper(0) and then call setPropA(...) - presumably its one of these methods ist having problems with? Anyway the problem usually with request scope beans is that when it calls the getSomeWrapper(index) method the array isn't initialized and it returns null - if you put logic to automatically grow your array in the getSomeWrapper(index) method then it should solve this. Niall On 12/6/06, Urso Wieske [EMAIL PROTECTED] wrote: Hi folks, I have problem with the scenario Indexed Properties, BeanUtils and Form on REQUEST scope. When I select a a value from (1 or 2) from the dropdownlist and submit the form, I get an exception from BeanUtils.populate method about some getter which can be found!?? IF change the scope of myForm to Session in my struts configuration, then I don't have a problem with beanutils. But I want my form on request scope! I have described below my problem scenario. Is there a solution to this problem?? (form on request
Struts1: Indexed Properties, BeanUtils populate, Form on REQUEST scope
Hi folks, I have problem with the scenario Indexed Properties, BeanUtils and Form on REQUEST scope. When I select a a value from (1 or 2) from the dropdownlist and submit the form, I get an exception from BeanUtils.populate method about some getter which can be found!?? IF change the scope of myForm to Session in my struts configuration, then I don't have a problem with beanutils. But I want my form on request scope! I have described below my problem scenario. Is there a solution to this problem?? (form on request scope) I have looked in diffenrent aspects but I am not sure what is happening here with BeanUtils: - commons BeanUtil JAR version issue? - scope (request/session) issue? - JRE/Beanutil issue? - program issue of in my scenario? - array issue? Thanks Urso Wieske Scenario abstraction of my problem: 1.PrepareAction/myForm {forward} 2.viewJSP -{submit}--- 3.ProcessAction/myForm Action Mapping Configuration relevant settings: 1) myForm (MyForm class) is on request scope 3) myForm(MyForm class) is on request scope MyForm considerations: I have a property someWrappers of type array of SomeWrapper (thus, not a List type!) properties: - SomeWrapper [] getSomeWrappers() { return someWrappers;} - void getSomeWrappers(SomeWrapper [] someWrapper) {this.someWrappers = someWrapper;} - SomeWrapper getSomeWrapper(int index) {return someWrappers[index];} - void setSomeWrapper(int index, SomeWrapper someWrapper) {this.someWrappers[index] = someWrapper;} I have changed the name of the indexed property from plural to single noun (someWrapper,... to bypass the JRE1.3/1.4 - JavaBeans specs - BeanUtils issue. My Target runtime is JRE5. viewJSP is a JSP file which has the following structure: html:form action=/someAction . logic:notEmpty name=myForm property=someWrappers logic:iterate property=someWrappers id=someWrapper html:select name=someWrapper property=propA indexed=true html:option value=11/html:option html:option value=22/html:option /html:select logic:iterate /logic:notEmpty . /html:form
RE: Struts1: Indexed Properties, BeanUtils populate, Form on REQUEST scope
Typo: When I select a a value from (1 or 2) from the dropdownlist and submit the form, I get an exception from BeanUtils.populate method about some getter which can NOT be found!?? Sorry -Oorspronkelijk bericht- Van: Urso Wieske Verzonden: woensdag 6 december 2006 13:44 Aan: user@struts.apache.org Onderwerp: Struts1: Indexed Properties, BeanUtils populate, Form on REQUEST scope Hi folks, I have problem with the scenario Indexed Properties, BeanUtils and Form on REQUEST scope. When I select a a value from (1 or 2) from the dropdownlist and submit the form, I get an exception from BeanUtils.populate method about some getter which can be found!?? IF change the scope of myForm to Session in my struts configuration, then I don't have a problem with beanutils. But I want my form on request scope! I have described below my problem scenario. Is there a solution to this problem?? (form on request scope) I have looked in diffenrent aspects but I am not sure what is happening here with BeanUtils: - commons BeanUtil JAR version issue? - scope (request/session) issue? - JRE/Beanutil issue? - program issue of in my scenario? - array issue? Thanks Urso Wieske Scenario abstraction of my problem: 1.PrepareAction/myForm {forward} 2.viewJSP -{submit}--- 3.ProcessAction/myForm Action Mapping Configuration relevant settings: 1) myForm (MyForm class) is on request scope 3) myForm(MyForm class) is on request scope MyForm considerations: I have a property someWrappers of type array of SomeWrapper (thus, not a List type!) properties: - SomeWrapper [] getSomeWrappers() { return someWrappers;} - void getSomeWrappers(SomeWrapper [] someWrapper) {this.someWrappers = someWrapper;} - SomeWrapper getSomeWrapper(int index) {return someWrappers[index];} - void setSomeWrapper(int index, SomeWrapper someWrapper) {this.someWrappers[index] = someWrapper;} I have changed the name of the indexed property from plural to single noun (someWrapper,... to bypass the JRE1.3/1.4 - JavaBeans specs - BeanUtils issue. My Target runtime is JRE5. viewJSP is a JSP file which has the following structure: html:form action=/someAction . logic:notEmpty name=myForm property=someWrappers logic:iterate property=someWrappers id=someWrapper html:select name=someWrapper property=propA indexed=true html:option value=11/html:option html:option value=22/html:option /html:select logic:iterate /logic:notEmpty . /html:form - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]