This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Cannot use one struts tag within another one?