This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Hi, friends, In my jsp page, there is input like this: <input type="text" name="aName" value="<%= myBean.getMyProperty() %>" > I want to rewrite it with struts tag as following: <html:text property="aName" value="<bean:write name="myBean" property="myProperty" />" />. But the compiler always complains error. As long as I remove <bean:write> tag, it works. I am wondering can't I use one struts tag within another one? thanks. henry
Henry/Darryl: I haven't really used the nested tags but from what I can recall, they still wouldn't do what Henry wanted to do, which is to nest a tag as an attribute value. Henry, you'll either have to stick with a variation of the first form: <input type="text" name="aName" value="<bean:write name="myBean" property="myProperty" />"> or set the value of your form property before you display it. I prefer to do this type of initialization in code rather than in the JSP since default values are usually considered as "business rules".
Joined: May 09, 2003
Junilu, you are correct. Nested tag cannot resolve my problem. Just thinking to use one of the ways you mentioned. Thanks a lot for all pastes. Henry
subject: Cannot use one struts tag within another one?