I want to show values in the text box for editing purpose. I'm able to get & show the value using <bean:write> tag. But i can't assign the value to text box. If i use like below code it's showing the full <bean:write> tag as String. <html:text property="userName" value='<bean:write name= "user" property="userName"/>'/> pls help me regarding this.
The whole point of using an html:text tag as opposed to <input type="text"> is so that the input element will be populated with the value of the corresponding property of the ActionForm bean. If you provide no value attribute, struts does this automatically.
Had the same problem as above. Tried various combinations of double and single quotes...but same error persisted. As Merrill suggested, removed the value attribute in the html:text tag and voila....the value the ActionForm already holding was displayed as default text in the html:text. Gr8. And if we dont want to have any default text value to be displayed in the jsp, jus set the text property in the ActionForm to null, using the setter method. Eg. user.setUserName(null); Or, can set the text property to null in the reset method.
This parrot is no more. It has ceased to be. Now it's a tiny ad: