Thanks all for your kindly help and attention. The NullPointerException is caused by something else. It turns out <!-- <nested:text property='illegalArgument'/> --> will not comment out the "illegalArgument", which caused the exception.
It seems to me the struts will automatically take care of the initiation of aForm and aBean. Enjoy coding. Denis -----Original Message----- From: Denis Wang [mailto:dwang@;brandmuscle.com] Sent: Tuesday, November 12, 2002 8:20 AM To: struts Subject: how to populate nested bean in actionform Hello, Suppose I have ActionForm aForm, which has a private field aBean. aBean is a dumb data hold class with a field aData. I can populate the aData from my backend data resources and write it to JSP as the following: <nested:form action='the action related the aForm'> <nested:nest property='aBean'> <nested:write property='aData'> ... My problem is how to read the aData from JSP and write it to my backend data resources. I tried: <nested:form action='the action related the aForm'> <nested:nest property='aBean'> <nested:text property='aData'> ... The server will throw NullPointerException. I am afraid the struts don't know how to initiate aBean before setProperty("aData"). Any help will be highly appreciated! Denis -- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org> -- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>