Re: BeanUtils.populate Error
Problem was resolved. but the reason was not exactly clear to me. What I am doing was: I was using the html:image tag of struts for replacement of html input type=image tag In this i was using html:image property=addButton value=continue srcKey=ask-question.button-submit.image altKey=ask-question.button-submit.alt border=0 / FYI -- I had this addButton declared in my Action Form. Actually I am having more then one image sumbit button in my form. when I removed the property attribute. it worked fine.. I think this was the reason... I don't know otherwise. Hope this may help others... -- Raman [EMAIL PROTECTED] - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 7:59 PM Subject: Re: BeanUtils.populate Error On 20 Dec 2003, at 11:28, Raman wrote: ya the properties are same both in bean and form... I have switched the validation off in cong file and on submitting the form same error is occuring. what can be the cause still not getting that My struts conf file is -- action path=/AskAQuestion type=actions.UpdateAskAQuestionAction attribute=askAQuestionForm This may be something new i dont know about but i've always used name=askAQuestionForm scope=request validate=false forward name=view path=ask-a-question/ /action action path=/UpdateAskAQuestion type=actions.UpdateAskAQuestionAction name=askAQuestionForm scope=request input=/AskAQuestion validate=false forward name=success path=/AskAQuestionList.do redirect=true/ /action action path=/AskAQuestionList type=actions.UpdateAskAQuestionAction scope=request parameter=List validate=false forward name=success path=ask-a-question-list/ /action -- Raman - Original Message - From: Firat TIRYAKI [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 4:20 PM Subject: Re: BeanUtils.populate Error check your form and bean properties, types, ... they have to be same... F. - Original Message - From: Raman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 12:41 PM Subject: Re: BeanUtils.populate Error Hi I am using Validator form... is there something i am doing wrong in that? -- Raman - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 4:11 PM Subject: Re: BeanUtils.populate Error When are you getting this? Are you using dynaforms and/or validator action forms? On 20 Dec 2003, at 09:36, Raman wrote: I am facing a error in Struts at BeanUtils.populate and not able to trace the cause. has anyone already face this problem? if yes what the cause. Pls help. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:980) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProce s sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav a :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) -- --- root cause java.lang.IllegalArgumentException: No bean specified at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(Prope r tyUtils.java:816) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:846) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:978) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProce s sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav a :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) - 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] - To
Re: ApplicationResources.properties
you made sure your ApplicationResources.properties is in the %TOMCAT_HOME%\webapps\DeployedName\WEB-INF\classes folder? and you checked the app was deployed http://host:8080/manager/list ? if not deploy the DeployedName as http://host:8080/manager/install?path=/DeployedNamewar=DeployedName Hth, Martin - Original Message - From: Mark Nichols [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 5:38 PM Subject: ApplicationResources.properties Good Afternoon, My application works fine until I create a WAR file out of it and deploy it to Tomat. Once there I get a Missing message key for index.title error. This error doesn't occur when running the development copy of the application. I have made sure that the ApplicationResources.properties file is the correct place in the WAR file. I'm sure that I have overlooked something obvious, and I would be grateful for someone pointing it out. Thanks Mark -- The Difference Between Smart and Stupid is the Depth of the Hole You Make When You Screw Up. - 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]
Re: Multiple Converters for the same class type
Ivan Take a look at Matt Raible's rather elegant solution for registering multiple ConvertUtils by implementing Converter public Object convert(Class type, Object value) method http://raibledesigns.com/page/rd/20030111 Hope this helps, Martin - Original Message - From: Ivan De La Pena [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 6:45 PM Subject: Multiple Converters for the same class type Guys, I have a situation where i get a date from the Database in String format , i have created a custom converter (and registered it ) which creates a Date object out of that String.now i have a new situation to take care of the same date is to be represented in the JSP page as a long. I am going to create another converter that takes a long and converts into Date. Now my question is , is it possible to register two converters for the same Date ?? So can i do this : ConvertUtils.register(new StringtoDateConverter(), Date.class) ConvertUtils.register(new LongtoDateConverter(), Date.class) If this worksthen i have no issues to take care of.my Date object gets created just fine from the backend (from String) and the front end (from a long)...and i guess the Converter that got registered first , would get precedence over the other. If it is possible, and what are the pitfalls ?? Thanx Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem in forward path in tileDefinitions.xml
Hi I am having a seperate tileDefinitions file and i am having an entry for it in struts-config and for all the forward to definitions is working fine.But now if i want to send the forward to a jsp file instead of a tileDefinition(since the forward is a plain jsp like error page i dont want to create a seperate definition) forward is not going to the jsp file.If i create a seperate tileDefinition havin only the jsp file , the forward is working fine.Should i have to create a seperate definition even if i am forwarding single jsp file, when i am using tileDefintions.xml Thx in acvance Regards Partha. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ClassCastException coming from DynaValidatorForm.validate()- bug or a feature?
Hi, Validator has support for validating multi-page forms via the use of an optional page attribute, associated with a field element, that can be set to an integer. From the Validator portion of the user guide: All validation for any field on a page less than or equal to the current page is performed server side. All validation for any field on a page equal to the current page is generated for the client side Javascript. A multi-part form expects the page attribute to be set html:hidden property=page value=1/ Since your form already defines a page property, and a non-integer one at that, I can see how things might get screwed up. Cheers, -Steve -Original Message- From: Janice [mailto:[EMAIL PROTECTED] Sent: Friday, December 19, 2003 2:25 PM To: [EMAIL PROTECTED] Subject: re: ClassCastException coming from DynaValidatorForm.validate()- bug or a feature? I went to the source to try to find out what was causing this problem, and I started to suspect that: form-property name=page type=java.lang.String initial=home / was the problem... sure enough, when I changed the name to thePage, instead of page, it worked. Would this be a bug or just a feature that I missed the documentation for? Janice - 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]
Problem in forward path in tileDefinitions.xml
Hi I am having a seperate tileDefinitions file and i am having an entry for it in struts-config and for all the forward to definitions is working fine.But now if i want to send the forward to a jsp file instead of a tileDefinition(since the forward is a plain jsp like error page i dont want to create a seperate definition) forward is not going to the jsp file.If i create a seperate tileDefinition havin only the jsp file , the forward is working fine.Should i have to create a seperate definition even if i am forwarding single jsp file, when i am using tileDefintions.xml Thx in acvance Regards Partha. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem in forward path in tileDefinitions.xml
You don't have to create a definition if you are simply forwarding to a JSP. If the TilesRequestProcessor is not able to find a definition matching the forward path specified it calls the standard Struts RequestProcessor which will handle it as a normal URI. On Sun, 2003-12-21 at 11:28, Parthasarathy Kesavaraj wrote: Hi I am having a seperate tileDefinitions file and i am having an entry for it in struts-config and for all the forward to definitions is working fine.But now if i want to send the forward to a jsp file instead of a tileDefinition(since the forward is a plain jsp like error page i dont want to create a seperate definition) forward is not going to the jsp file.If i create a seperate tileDefinition havin only the jsp file , the forward is working fine.Should i have to create a seperate definition even if i am forwarding single jsp file, when i am using tileDefintions.xml Thx in acvance Regards Partha. - 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]
RE: Problem in forward path in tileDefinitions.xml
but when i give a jsp directly it id waying URL eror -- From: Norm Deane[SMTP:[EMAIL PROTECTED] Reply To: Struts Users Mailing List Sent: Sunday, December 21, 2003 11:11 PM To: Struts Users Mailing List Subject: Re: Problem in forward path in tileDefinitions.xml You don't have to create a definition if you are simply forwarding to a JSP. If the TilesRequestProcessor is not able to find a definition matching the forward path specified it calls the standard Struts RequestProcessor which will handle it as a normal URI. On Sun, 2003-12-21 at 11:28, Parthasarathy Kesavaraj wrote: Hi I am having a seperate tileDefinitions file and i am having an entry for it in struts-config and for all the forward to definitions is working fine.But now if i want to send the forward to a jsp file instead of a tileDefinition(since the forward is a plain jsp like error page i dont want to create a seperate definition) forward is not going to the jsp file.If i create a seperate tileDefinition havin only the jsp file , the forward is working fine.Should i have to create a seperate definition even if i am forwarding single jsp file, when i am using tileDefintions.xml Thx in acvance Regards Partha. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple Converters for the same class type
Marty, Thanx for the response , thats what i am doing for now. I just wanted to know if its possible to do the way i am suggesting . Thanx Ivan -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Sunday, December 21, 2003 3:21 PM To: Struts Users Mailing List Subject: Re: Multiple Converters for the same class type Ivan Take a look at Matt Raible's rather elegant solution for registering multiple ConvertUtils by implementing Converter public Object convert(Class type, Object value) method http://raibledesigns.com/page/rd/20030111 Hope this helps, Martin - Original Message - From: Ivan De La Pena [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 6:45 PM Subject: Multiple Converters for the same class type Guys, I have a situation where i get a date from the Database in String format , i have created a custom converter (and registered it ) which creates a Date object out of that String.now i have a new situation to take care of the same date is to be represented in the JSP page as a long. I am going to create another converter that takes a long and converts into Date. Now my question is , is it possible to register two converters for the same Date ?? So can i do this : ConvertUtils.register(new StringtoDateConverter(), Date.class) ConvertUtils.register(new LongtoDateConverter(), Date.class) If this worksthen i have no issues to take care of.my Date object gets created just fine from the backend (from String) and the front end (from a long)...and i guess the Converter that got registered first , would get precedence over the other. If it is possible, and what are the pitfalls ?? Thanx Ivan - 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]
RE: Problem in forward path in tileDefinitions.xml
A 404 error? Are you sure the URI you're using is correct? You don't have a tiles definition that has the same name as the URI your using do you? Can you post your struts-config.xml and tiles-defs.xml? On Sun, 2003-12-21 at 11:46, Parthasarathy Kesavaraj wrote: but when i give a jsp directly it id waying URL eror -- From: Norm Deane[SMTP:[EMAIL PROTECTED] Reply To: Struts Users Mailing List Sent: Sunday, December 21, 2003 11:11 PM To: Struts Users Mailing List Subject:Re: Problem in forward path in tileDefinitions.xml You don't have to create a definition if you are simply forwarding to a JSP. If the TilesRequestProcessor is not able to find a definition matching the forward path specified it calls the standard Struts RequestProcessor which will handle it as a normal URI. On Sun, 2003-12-21 at 11:28, Parthasarathy Kesavaraj wrote: Hi I am having a seperate tileDefinitions file and i am having an entry for it in struts-config and for all the forward to definitions is working fine.But now if i want to send the forward to a jsp file instead of a tileDefinition(since the forward is a plain jsp like error page i dont want to create a seperate definition) forward is not going to the jsp file.If i create a seperate tileDefinition havin only the jsp file , the forward is working fine.Should i have to create a seperate definition even if i am forwarding single jsp file, when i am using tileDefintions.xml Thx in acvance Regards Partha. - 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] - 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]
error:null property value please HELP
hi! i am getting an error when i submit a form. briefly i have a tree stucture that gets displayed, along with checkboxes to select a particular node. the tree structure is of the type: class TreeStructure{ private ArrayList children;} //the ArrayList children contains objects of type //TreeStructure the structure includes a property 'selected' of type boolean. My ActionForm includes the tree as a property called 'functions'. i display them as html:form action=/saveUserConfig nested:nest property=functions jsp:include page=treenode.jsp/ /nested:nest html:submit value=Submit/ /html:form //treenode.jsp is nested:root nested:checkbox property=selected value=true/ nested:write property=nodeName/br nested:iterate property=children jsp:include page=treenode.jsp / /nested:iterate /nested:root the error i get is exception javax.servlet.ServletException: BeanUtils.populate org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) root cause java.lang.IllegalArgumentException: Null property value for 'functions' org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:755) org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801) org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:796) org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:729) org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) please help thanks Ajay _ Get less junk mail with ninemsn Premium. Click here http://ninemsn.com.au/premium/landing.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error:null property value please HELP
Hi Ajay I am doing something similar... I have a Tree class and a Node class to represent either branches or leaves of the tree. The Tree class has a field called treeRoot that represents the root Node. I ha ve an action that creates the tree and puts it on the request then in the JSP I have something like: %-- Loop through the array list of trees to display each root node. Note that 'myTree' was placed on the request by an Action --% logic:present name=myTree nested:root name=currentTree nested:nest property=treeRoot div class=root jsp:include page=treenode.jsp / /div /nested:nest /nested:root /logic:present Actually my jsp is slightly different because I can have multiple root nodes and I also iterate through each root node to display each tree. I have chopped those bits out to make the code more readable. So it seems that you are trying to reference a field functions that isn't declared in your tree class. Hope that helps. Heya Gosper CSC Australia 212 Northbourne Ave, Braddon ACT 2612 Ph: +61 (0) 2 6246 8155 Fax: +61 (0) 2 62468100 MOB: 0401 611779 This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ajay brar [EMAIL PROTECTED] 22/12/2003 12:55 PM Please respond to Struts Users Mailing List To: [EMAIL PROTECTED] cc: Subject:error:null property value please HELP hi! i am getting an error when i submit a form. briefly i have a tree stucture that gets displayed, along with checkboxes to select a particular node. the tree structure is of the type: class TreeStructure{ private ArrayList children;} //the ArrayList children contains objects of type //TreeStructure the structure includes a property 'selected' of type boolean. My ActionForm includes the tree as a property called 'functions'. i display them as html:form action=/saveUserConfig nested:nest property=functions jsp:include page=treenode.jsp/ /nested:nest html:submit value=Submit/ /html:form //treenode.jsp is nested:root nested:checkbox property=selected value=true/ nested:write property=nodeName/br nested:iterate property=children jsp:include page=treenode.jsp / /nested:iterate /nested:root the error i get is exception javax.servlet.ServletException: BeanUtils.populate org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) root cause java.lang.IllegalArgumentException: Null property value for 'functions' org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:755) org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801) org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:796) org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:729) org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) please help thanks Ajay _ Get less junk mail with ninemsn Premium. Click here http://ninemsn.com.au/premium/landing.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error:null property value please HELP
hi! 'functions' is the name of the tree structure in the form class, as class SomeForm extends ActionForm { private TreeStructure functions;} this form class also includes some String attributes. The whole display works fine, i have some text boxes for the String fields in the form, the tree structure gets displayed with the corresponding checkboxes. the problem arises when i select a particular checkbox and submit. thats when i get the error i mentioned earlier. however if i just fill the text boxes and do not select and checkbox the form submits fine. any clues? thanks Ajay From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: error:null property value please HELP Date: Mon, 22 Dec 2003 13:28:17 +1100 Hi Ajay I am doing something similar... I have a Tree class and a Node class to represent either branches or leaves of the tree. The Tree class has a field called treeRoot that represents the root Node. I ha ve an action that creates the tree and puts it on the request then in the JSP I have something like: %-- Loop through the array list of trees to display each root node. Note that 'myTree' was placed on the request by an Action --% logic:present name=myTree nested:root name=currentTree nested:nest property=treeRoot div class=root jsp:include page=treenode.jsp / /div /nested:nest /nested:root /logic:present Actually my jsp is slightly different because I can have multiple root nodes and I also iterate through each root node to display each tree. I have chopped those bits out to make the code more readable. So it seems that you are trying to reference a field functions that isn't declared in your tree class. Hope that helps. Heya Gosper CSC Australia 212 Northbourne Ave, Braddon ACT 2612 Ph: +61 (0) 2 6246 8155 Fax: +61 (0) 2 62468100 MOB: 0401 611779 This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ajay brar [EMAIL PROTECTED] 22/12/2003 12:55 PM Please respond to Struts Users Mailing List To: [EMAIL PROTECTED] cc: Subject:error:null property value please HELP hi! i am getting an error when i submit a form. briefly i have a tree stucture that gets displayed, along with checkboxes to select a particular node. the tree structure is of the type: class TreeStructure{ private ArrayList children;} //the ArrayList children contains objects of type //TreeStructure the structure includes a property 'selected' of type boolean. My ActionForm includes the tree as a property called 'functions'. i display them as html:form action=/saveUserConfig nested:nest property=functions jsp:include page=treenode.jsp/ /nested:nest html:submit value=Submit/ /html:form //treenode.jsp is nested:root nested:checkbox property=selected value=true/ nested:write property=nodeName/br nested:iterate property=children jsp:include page=treenode.jsp / /nested:iterate /nested:root the error i get is exception javax.servlet.ServletException: BeanUtils.populate org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) root cause java.lang.IllegalArgumentException: Null property value for 'functions' org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:755) org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801) org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:796) org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:729) org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
error tag
Hello, I am handling my errors and constructing an errors object thus: ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(Initialisation error - userID not found)); saveErrors(request, errors); return mapping.findForward(FORWARD_error); how from the JSP do I iterate over the errors object and retrieve the messages please? I have tried html:errors/ but nothing was rendered to the screen? thanks G - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now
RE: [other] error tag
Hi Jerald, The single-string ActionError class constructor that you are invoking interprets the parameter passed to it as a key of a message string defined in your Application.properties file (this file is usually placed under the classes/resources directory). HTH Noel -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Sunday, December 21, 2003 9:45 PM To: Struts Users Mailing List Subject: [other] error tag Hello, I am handling my errors and constructing an errors object thus: ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(Initialisation error - userID not found)); saveErrors(request, errors); return mapping.findForward(FORWARD_error); how from the JSP do I iterate over the errors object and retrieve the messages please? I have tried html:errors/ but nothing was rendered to the screen? thanks G - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error:null property value please HELP
Hi Ajay, Sorry, I didn't realise the problem had to do with checkboxes. I can offer a clue or two perhaps but you would be best off reading the struts doco on checkboxes. clue 1: checkbox values are stored as Strings. clue 2: only selec ted checkbox values are submitted, not unselected ones. you probably knew that already, hence my suggestion to read the struts doco. Cheers, Heya Gosper CSC Australia 212 Northbourne Ave, Braddon ACT 2612 Ph: +61 (0) 2 6246 8155 Fax: +61 (0) 2 62468100 MOB: 0401 611779 This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ajay brar [EMAIL PROTECTED] 22/12/2003 01:42 PM Please respond to Struts Users Mailing List To: [EMAIL PROTECTED] cc: Subject:Re: error:null property value please HELP hi! 'functions' is the name of the tree structure in the form class, as class SomeForm extends ActionForm { private TreeStructure functions;} this form class also includes some String attributes. The whole display works fine, i have some text boxes for the String fields in the form, the tree structure gets displayed with the corresponding checkboxes. the problem arises when i select a particular checkbox and submit. thats when i get the error i mentioned earlier. however if i just fill the text boxes and do not select and checkbox the form submits fine. any clues? thanks Ajay From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: error:null property value please HELP Date: Mon, 22 Dec 2003 13:28:17 +1100 Hi Ajay I am doing something similar... I have a Tree class and a Node class to represent either branches or leaves of the tree. The Tree class has a field called treeRoot that represents the root Node. I ha ve an action that creates the tree and puts it on the request then in the JSP I have something like: %-- Loop through the array list of trees to display each root node. Note that 'myTree' was placed on the request by an Action --% logic:present name=myTree nested:root name=currentTree nested:nest property=treeRoot div class=root jsp:include page=treenode.jsp / /div /nested:nest /nested:root /logic:present Actually my jsp is slightly different because I can have multiple root nodes and I also iterate through each root node to display each tree. I have chopped those bits out to make the code more readable. So it seems that you are trying to reference a field functions that isn't declared in your tree class. Hope that helps. Heya Gosper CSC Australia 212 Northbourne Ave, Braddon ACT 2612 Ph: +61 (0) 2 6246 8155 Fax: +61 (0) 2 62468100 MOB: 0401 611779 This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ajay brar [EMAIL PROTECTED] 22/12/2003 12:55 PM Please respond to Struts Users Mailing List To: [EMAIL PROTECTED] cc: Subject:error:null property value please HELP hi! i am getting an error when i submit a form. briefly i have a tree stucture that gets displayed, along with checkboxes to select a particular node. the tree structure is of the type: class TreeStructure{ private ArrayList children;} //the ArrayList children contains objects of type //TreeStructure the structure includes a property 'selected' of type boolean. My ActionForm includes the tree as a property called 'functions'. i display them as html:form action=/saveUserConfig nested:nest property=functions jsp:include page=treenode.jsp/ /nested:nest html:submit value=Submit/ /html:form //treenode.jsp is nested:root nested:checkbox property=selected value=true/ nested:write property=nodeName/br
RE: OT: Examples of HTML-based user interfaces?
Thats good. Btw: If I were you I would set the Netscape bar to version 7 (or any mozilla version above 1). Netscrap 6 is based on a pre-1 version of Mozilla, and has a couple of very nasty bugs that can make trying to do certain DHTML things an absolute nightmare. (Such as not submitting values for controls that are under hidden nodes, etc...) The other thing to keep in mind is that JavaScript widgets always seem to take far longer to implement than you think they will! - So the simpler you can keep things the better, and as with all languages using good programming techniques in JavaScript will pay off when it comes to maintenance and enhancement. Its very easy when coding JavaScript DHML stuff to just anyhow try and bang together something that runs but where the code is very ugly. Ive learnt the hard way that it quickly becomes a nightmare to maintain! (and yet I keep doing it. garrgh! (99.9% of the freely downloadable JS widgets to be found on the net on various DHTML sites are nasty like this. Its often actually easier to roll your own than to try and find a suitable widget out there and modify it for your needs (tree components being a prime example)) So even if its just a simple widget like the two box selector thinghy, sitting down to design it properly , and make it modular and reusable (for example writing a custom tag to encapsulate it in a way that seems transparent to the page designer), will pay dividends! If your not totally familiar with the subtle details of JavaScript (how objects work, prototyping, implicit type casting etc...), spending a day studying the language in detail (ie: actually making notes like you did back in college) will be a day well spent! (it will save you at least a week debugging!) hth Andrew -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Friday, 19 December 2003 22:36 To: Struts Users Mailing List Subject: RE: OT: Examples of HTML-based user interfaces? From: Andrew Hill [mailto:[EMAIL PROTECTED] Still, if you are in a position to limit your audience (such as with intranet apps) to just the more common modern browsers (IE5+, Mozilla) there is indeed a lot you can do with DHTML. I should have said that up front-- it is intranet and we can (and do) refuse to support browsers which won't play nicely. All I officially have to support is a reasonably recent IE Netscape. And they can't disable javascript, or they won't get very far. :) I don't go out of my way to break stuff on other browsers (and I test from home on Mozilla/Konqueror) but if it gets to be too much trouble, I don't have to mess with it. Thanks for the tips! -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - 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]
RE: [other] error tag
Hi Noel, Thanks for that. Since that post, I have opted for constructing an ActionMessages object and populating it with ActionMessage (s). This being because I hear ActionError/s are deprecated as of Struts 1.2. I have set up the Application.properties file under WEB-INF/classes/resources containing: initialisation.error=Initialisation error - invalid UserID I catch the exception thus: ActionMessages messages = new ActionMessages(); ActionMessage errorMsg = new ActionMessage(initialisation.error); messages.add(init_message, errorMsg); saveMessages(request, messages); and forward off to the error page, but nothing is rendered. Any idea here? Perhaps something to do with the init_message string I am passing? What does that represent? appreciated G. Hi Jerald, The single-string ActionError class constructor that you are invoking interprets the parameter passed to it as a key of a message string defined in your Application.properties file (this file is usually placed under the classes/resources directory). HTH Noel -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Sunday, December 21, 2003 9:45 PM To: Struts Users Mailing List Subject: [other] error tag Hello, I am handling my errors and constructing an errors object thus: ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(Initialisation error - userID not found)); saveErrors(request, errors); return mapping.findForward(FORWARD_error); how from the JSP do I iterate over the errors object and retrieve the messages please? I have tried but nothing was rendered to the screen? thanks G - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now
RE: [other] error tag PS
it just occurrred to me, perhaps it may be due to the JSP: html:errors / as ActionMessages are not soley used for error handling? If this is the case, what error tag will extract the error labels defined in my Application.properties? thanks again G - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now