As an alternative to tiles:importAttribute and bean:write, you could just use:
<tiles:getAsString name="action" /> tiles-def.xml can stay the same. tiles:importAttribute would not be necessary with this approach. -----Original Message----- From: Dean A. Hoover [mailto:[EMAIL PROTECTED] Sent: Monday, March 29, 2004 5:05 PM To: Struts Users Mailing List Subject: Re: string substitution in tiles Avinash, Thanks. I've never used importAttribute before. Dean Avinash Gangadharan wrote: >Try this : > >In tiles-def.xml --- <put name="action" value="Logon.do" /> > >In your jsp --- ><tiles:importAttribute /> ><html:form method="post" action='<bean:write name="action"/>'> > > > > > > > > > >-----Original Message----- >From: Dean A. Hoover [mailto:[EMAIL PROTECTED] >Sent: Monday, March 29, 2004 1:40 PM >To: [EMAIL PROTECTED] >Subject: string substitution in tiles > > >I have a general form layout I am defining in >tiles. But there is one thing I'm not sure how >to do. The relevant part of the form layout >looks like this: > ><td valign="top"> ><html:form method="post" action="xxx"> ><table cellpadding="0" cellspacing="0" width="100%"> ><tr> ><td> ><table cellpadding="0" cellspacing="0" width="100%"> ><tr> ><td><els:spacer width="150"/></td> ><td><els:spacer width="250"/></td> ></tr> ><tiles:get name="subForm"/> ></table> ></td> ></tr> ><tr> ><td> ><tiles:get name="buttons"/> ></td> ></tr> ></table> ></html:form> ></td> > > >I want to replace the xxx action with a string >I define in tiles-defs.xml. Say I want to call the >replacement string "url" and in one instance I >want it to be "/Logon.do". What does the put >look like in tiles-defs.xml and how can I modify >the JSP snippet shown above to do the appropriate >replacement (for action="xxx")? > >Thanks. >Dean Hoover > > > > >--------------------------------------------------------------------- >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] > > > > "The sender believes that this E-Mail and any attachments were free of any virus, worm, Trojan horse, and/or malicious code when sent. This message and its attachments could have been infected during transmission. By reading the message and opening any attachments, the recipient accepts full responsibility for taking proactive and remedial action about viruses and other defects. The sender's business entity is not liable for any loss or damage arising in any way from this message or its attachments." --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]