after changing validator stranze problem
i have changed my validator from required to requiredstring and i am getting the following error. before changing everything is working fine. what could be the problem? Dec 26, 2014 2:22:05 PM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception tag 'select', field 'list', name 'primaryDetails.branchId': The requested list key 'branches' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location] at org.apache.struts2.components.Component.fieldError(Component.java:257) at org.apache.struts2.components.Component.findValue(Component.java:350) at org.apache.struts2.components.ListUIBean.evaluateExtraParams(ListUIBean.java:82) *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/*
Re: validation problem
Hi Sreekanth, sorry to say this. I tried everything stated in the example that u gave. but it did not work for me. I am doing something wrong but could not find out what. Thank u for all your help. *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/* On Fri, Dec 26, 2014 at 12:24 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: I couldn't make your sample war run at all, please find the attached sample war which is working for me in tomcat 7 (struts2 jars and other dep not included). You can follow the directory structure and naming convention and try to do the same in your project. Do not add @SkipValidation annotation in your save or submit method (@SkipValidation will in fact ignore validation for it) -- Thanks Regards Sreekanth S Nair Java Developer --- eGovernments Foundation http://www.egovernments.org Ph : 9980078913 --- http://in.linkedin.com/pub/sreekanth-s-nair/b/946/5a0/ https://github.com/sreekanthsnair sreekanthsn...@hotmail.co.uk sreekanths...@gmail.com --- On Fri, Dec 26, 2014 at 11:32 AM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Ok let me try and will get back to you... On Fri, Dec 26, 2014 at 11:26 AM, Yaragalla Muralidhar yaragallamur...@gmail.com wrote: Hi Sreekanth, I think i cannot send attachements to the mailing list so i have uploaded the project to my drive and sharing the link https://drive.google.com/file/d/0B59LVhKQaKQYamZqbnc4NGtOQm8/view?usp=sharing i am using tomcat 7. *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/* On Fri, Dec 26, 2014 at 9:32 AM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Can you share a sample project which is not working, and just let me know which server you are trying..? -- Thanks Regards Sreekanth S Nair Java Developer --- eGovernments Foundation http://www.egovernments.org Ph : 9980078913 --- http://in.linkedin.com/pub/sreekanth-s-nair/b/946/5a0/ https://github.com/sreekanthsnair sreekanthsn...@hotmail.co.uk sreekanths...@gmail.com --- On Fri, Dec 26, 2014 at 9:10 AM, Yaragalla Muralidhar yaragallamur...@gmail.com wrote: Hi sreekanth, I have changed the names as u suggested but it did not work. i have read the link u posted and i did everything that the link says. i have debugged as well. it is not throwing any error. *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/* On Thu, Dec 25, 2014 at 10:43 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: As Dave said, kindly show some patience. First of validation is nothing to do with theme so just leave the theme alone. 1) Can you try renaming the action class name from SampleRegOne to SampleRegOneAction and same in struts.xml 2) If you give action alias name like below, action name=sampleRegOne class=com.zedlabs.samplereg.action.SampleRegOne as far as i understood you need to use the alias name suffixed along with the action class name so in essence your validator xml name should be some thing like below SampleRegOne-sampleRegOne-validation.xml Since i don't have much knowledge in xml based validation i recommend you to read upon struts2 xml based validation from the below link http://www.codejava.net/frameworks/struts/struts2-form-validation-basic-example-using-xml If the above solution is not working then try and figure out the problem by debugging through struts2 source. If the above solutions couldn't resolve your problem then get some debug level log of struts2 while accessing that particular action and post it over here. On Thu, Dec 25, 2014 at 8:34 PM, Dave Newton davelnew...@gmail.com wrote: Unrelated to the technical issue: bear in mind the mailing list is a volunteer-staffed resource. Nobody is deliberately delaying a response. We already know you need help. In the US, at least, it's a fairly major holiday, and people are doing things besides trying to reproduce your environment and code to help out. With that in mind, please be patient. On Thu, Dec 25, 2014 at 9:01 AM, Yaragalla Muralidhar yaragallamur...@gmail.com wrote: kindly help me solve this issue *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/ * On Thu, Dec 25, 2014 at 8:02 PM, Yaragalla
Re: validation problem
There is nothing about sorry, i guess your action package structure or something is wrong, i recommend you to run the sample war i have attached in tomcat 7 and see the result (make sure to include strust2 latest lib to its WEB-INF/lib). Try adding your action class one by one to that sample and try again. On Fri, Dec 26, 2014 at 3:07 PM, Yaragalla Muralidhar yaragallamur...@gmail.com wrote: Hi Sreekanth, sorry to say this. I tried everything stated in the example that u gave. but it did not work for me. I am doing something wrong but could not find out what. Thank u for all your help. *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/* On Fri, Dec 26, 2014 at 12:24 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: I couldn't make your sample war run at all, please find the attached sample war which is working for me in tomcat 7 (struts2 jars and other dep not included). You can follow the directory structure and naming convention and try to do the same in your project. Do not add @SkipValidation annotation in your save or submit method (@SkipValidation will in fact ignore validation for it) -- Thanks Regards Sreekanth S Nair Java Developer --- eGovernments Foundation http://www.egovernments.org Ph : 9980078913 --- http://in.linkedin.com/pub/sreekanth-s-nair/b/946/5a0/ https://github.com/sreekanthsnair sreekanthsn...@hotmail.co.uk sreekanths...@gmail.com --- On Fri, Dec 26, 2014 at 11:32 AM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Ok let me try and will get back to you... On Fri, Dec 26, 2014 at 11:26 AM, Yaragalla Muralidhar yaragallamur...@gmail.com wrote: Hi Sreekanth, I think i cannot send attachements to the mailing list so i have uploaded the project to my drive and sharing the link https://drive.google.com/file/d/0B59LVhKQaKQYamZqbnc4NGtOQm8/view?usp=sharing i am using tomcat 7. *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/* On Fri, Dec 26, 2014 at 9:32 AM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Can you share a sample project which is not working, and just let me know which server you are trying..? -- Thanks Regards Sreekanth S Nair Java Developer --- eGovernments Foundation http://www.egovernments.org Ph : 9980078913 --- http://in.linkedin.com/pub/sreekanth-s-nair/b/946/5a0/ https://github.com/sreekanthsnair sreekanthsn...@hotmail.co.uk sreekanths...@gmail.com --- On Fri, Dec 26, 2014 at 9:10 AM, Yaragalla Muralidhar yaragallamur...@gmail.com wrote: Hi sreekanth, I have changed the names as u suggested but it did not work. i have read the link u posted and i did everything that the link says. i have debugged as well. it is not throwing any error. *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/* On Thu, Dec 25, 2014 at 10:43 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: As Dave said, kindly show some patience. First of validation is nothing to do with theme so just leave the theme alone. 1) Can you try renaming the action class name from SampleRegOne to SampleRegOneAction and same in struts.xml 2) If you give action alias name like below, action name=sampleRegOne class=com.zedlabs.samplereg.action.SampleRegOne as far as i understood you need to use the alias name suffixed along with the action class name so in essence your validator xml name should be some thing like below SampleRegOne-sampleRegOne-validation.xml Since i don't have much knowledge in xml based validation i recommend you to read upon struts2 xml based validation from the below link http://www.codejava.net/frameworks/struts/struts2-form-validation-basic-example-using-xml If the above solution is not working then try and figure out the problem by debugging through struts2 source. If the above solutions couldn't resolve your problem then get some debug level log of struts2 while accessing that particular action and post it over here. On Thu, Dec 25, 2014 at 8:34 PM, Dave Newton davelnew...@gmail.com wrote: Unrelated to the technical issue: bear in mind the mailing list is a volunteer-staffed resource. Nobody is deliberately delaying a response. We already know
Re: validation problem
I will do that. Thank you so much. *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/* On Fri, Dec 26, 2014 at 3:14 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: There is nothing about sorry, i guess your action package structure or something is wrong, i recommend you to run the sample war i have attached in tomcat 7 and see the result (make sure to include strust2 latest lib to its WEB-INF/lib). Try adding your action class one by one to that sample and try again. On Fri, Dec 26, 2014 at 3:07 PM, Yaragalla Muralidhar yaragallamur...@gmail.com wrote: Hi Sreekanth, sorry to say this. I tried everything stated in the example that u gave. but it did not work for me. I am doing something wrong but could not find out what. Thank u for all your help. *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/* On Fri, Dec 26, 2014 at 12:24 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: I couldn't make your sample war run at all, please find the attached sample war which is working for me in tomcat 7 (struts2 jars and other dep not included). You can follow the directory structure and naming convention and try to do the same in your project. Do not add @SkipValidation annotation in your save or submit method (@SkipValidation will in fact ignore validation for it) -- Thanks Regards Sreekanth S Nair Java Developer --- eGovernments Foundation http://www.egovernments.org Ph : 9980078913 --- http://in.linkedin.com/pub/sreekanth-s-nair/b/946/5a0/ https://github.com/sreekanthsnair sreekanthsn...@hotmail.co.uk sreekanths...@gmail.com --- On Fri, Dec 26, 2014 at 11:32 AM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Ok let me try and will get back to you... On Fri, Dec 26, 2014 at 11:26 AM, Yaragalla Muralidhar yaragallamur...@gmail.com wrote: Hi Sreekanth, I think i cannot send attachements to the mailing list so i have uploaded the project to my drive and sharing the link https://drive.google.com/file/d/0B59LVhKQaKQYamZqbnc4NGtOQm8/view?usp=sharing i am using tomcat 7. *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/* On Fri, Dec 26, 2014 at 9:32 AM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Can you share a sample project which is not working, and just let me know which server you are trying..? -- Thanks Regards Sreekanth S Nair Java Developer --- eGovernments Foundation http://www.egovernments.org Ph : 9980078913 --- http://in.linkedin.com/pub/sreekanth-s-nair/b/946/5a0/ https://github.com/sreekanthsnair sreekanthsn...@hotmail.co.uk sreekanths...@gmail.com --- On Fri, Dec 26, 2014 at 9:10 AM, Yaragalla Muralidhar yaragallamur...@gmail.com wrote: Hi sreekanth, I have changed the names as u suggested but it did not work. i have read the link u posted and i did everything that the link says. i have debugged as well. it is not throwing any error. *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/* On Thu, Dec 25, 2014 at 10:43 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: As Dave said, kindly show some patience. First of validation is nothing to do with theme so just leave the theme alone. 1) Can you try renaming the action class name from SampleRegOne to SampleRegOneAction and same in struts.xml 2) If you give action alias name like below, action name=sampleRegOne class=com.zedlabs.samplereg.action.SampleRegOne as far as i understood you need to use the alias name suffixed along with the action class name so in essence your validator xml name should be some thing like below SampleRegOne-sampleRegOne-validation.xml Since i don't have much knowledge in xml based validation i recommend you to read upon struts2 xml based validation from the below link http://www.codejava.net/frameworks/struts/struts2-form-validation-basic-example-using-xml If the above solution is not working then try and figure out the problem by debugging through struts2 source. If the above solutions couldn't resolve your problem then get
Re: validation problem
2014-12-26 6:56 GMT+01:00 Yaragalla Muralidhar yaragallamur...@gmail.com: Hi Sreekanth, I think i cannot send attachements to the mailing list so i have uploaded the project to my drive and sharing the link https://drive.google.com/file/d/0B59LVhKQaKQYamZqbnc4NGtOQm8/view?usp=sharing Can you pack all the files with zip or something like that and share the archive? Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: validation problem
2014-12-26 15:19 GMT+01:00 Lukasz Lenart lukaszlen...@apache.org: 2014-12-26 6:56 GMT+01:00 Yaragalla Muralidhar yaragallamur...@gmail.com: Hi Sreekanth, I think i cannot send attachements to the mailing list so i have uploaded the project to my drive and sharing the link https://drive.google.com/file/d/0B59LVhKQaKQYamZqbnc4NGtOQm8/view?usp=sharing Can you pack all the files with zip or something like that and share the archive? Nvm, got it :) Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: validation problem
2014-12-26 15:19 GMT+01:00 Lukasz Lenart lukaszlen...@apache.org: 2014-12-26 6:56 GMT+01:00 Yaragalla Muralidhar yaragallamur...@gmail.com: Hi Sreekanth, I think i cannot send attachements to the mailing list so i have uploaded the project to my drive and sharing the link https://drive.google.com/file/d/0B59LVhKQaKQYamZqbnc4NGtOQm8/view?usp=sharing Can you start that app? I've noticed include file=mailreader-default.xml/ in sample-reg.xml but such file doesn't exist which means Struts will blow up with some error in the logs. Another thing, even empty text field means something - an empty string - if you read the docs [1] it will clearly says: RequiredFieldValidator checks if the specified field is not null. where empty string != null I think you want to specify min length of the String so you should use stringlength [2] instead. One more remark: you don't have to put validators.xml - it's only needed when you define your own validators. And I kindly suggest, please re-read the docs about how to setup validation and what each of the validators do [3]. [1] http://struts.apache.org/docs/required-validator.html [2] http://struts.apache.org/docs/stringlength-validator.html [3] http://struts.apache.org/docs/validation.html Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: validation problem
Thank you Lukasz. I have rectified all the mistakes that u listed. Validations are working. I also have done some simple mistakes. I have rectified all the mistakes. Everything is working fine now. Thanks to all of you. *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/* On Fri, Dec 26, 2014 at 8:09 PM, Lukasz Lenart lukaszlen...@apache.org wrote: 2014-12-26 15:19 GMT+01:00 Lukasz Lenart lukaszlen...@apache.org: 2014-12-26 6:56 GMT+01:00 Yaragalla Muralidhar yaragallamur...@gmail.com: Hi Sreekanth, I think i cannot send attachements to the mailing list so i have uploaded the project to my drive and sharing the link https://drive.google.com/file/d/0B59LVhKQaKQYamZqbnc4NGtOQm8/view?usp=sharing Can you start that app? I've noticed include file=mailreader-default.xml/ in sample-reg.xml but such file doesn't exist which means Struts will blow up with some error in the logs. Another thing, even empty text field means something - an empty string - if you read the docs [1] it will clearly says: RequiredFieldValidator checks if the specified field is not null. where empty string != null I think you want to specify min length of the String so you should use stringlength [2] instead. One more remark: you don't have to put validators.xml - it's only needed when you define your own validators. And I kindly suggest, please re-read the docs about how to setup validation and what each of the validators do [3]. [1] http://struts.apache.org/docs/required-validator.html [2] http://struts.apache.org/docs/stringlength-validator.html [3] http://struts.apache.org/docs/validation.html Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
problem with select boxes
Hi If i have 5 select boxes on the first page which is mapped to lists. this lists should be populated in the action class that launches the page and also in the action class that we are submitting. So we have to write the same code in two places. Is there a way that we can avoid this? *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/*
Re: validation problem
2014-12-26 18:25 GMT+01:00 Yaragalla Muralidhar yaragallamur...@gmail.com: Thank you Lukasz. I have rectified all the mistakes that u listed. Validations are working. I also have done some simple mistakes. I have rectified all the mistakes. Everything is working fine now. Thanks to all of you. Great to hear that! Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: problem with select boxes
2014-12-26 18:42 GMT+01:00 Yaragalla Muralidhar yaragallamur...@gmail.com: Hi If i have 5 select boxes on the first page which is mapped to lists. this lists should be populated in the action class that launches the page and also in the action class that we are submitting. So we have to write the same code in two places. Is there a way that we can avoid this? You can use inheritance or different methods in the same action class ie. input() and save() - then you can use the same list for populating the form and storing the values. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: problem with select boxes
ok. thank u so much. *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/* On Sat, Dec 27, 2014 at 12:52 AM, Lukasz Lenart lukaszlen...@apache.org wrote: 2014-12-26 18:42 GMT+01:00 Yaragalla Muralidhar yaragallamur...@gmail.com : Hi If i have 5 select boxes on the first page which is mapped to lists. this lists should be populated in the action class that launches the page and also in the action class that we are submitting. So we have to write the same code in two places. Is there a way that we can avoid this? You can use inheritance or different methods in the same action class ie. input() and save() - then you can use the same list for populating the form and storing the values. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
css_xhtml theme issue
Hi I am using css_xhtml theme. in this when there is validation error it is displaying on top of the field so the alignment of the html components are going bad. I dont want that to happen. i want to display all the eerrors on top of the page. Is it possible? *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/*