Whenever I try to us s:include or jsp:include to access a Struts 2 action from within the SiteMesh decorator I get
The requested resource (Relative URL) is not available. Surely this should be possible. -----Original Message----- From: David Loup Sent: 02 September 2008 12:55 To: Struts Users Mailing List Subject: RE: Include menu action with sitemesh Hi Wes, Thanks for your reply. Am using Struts 2.0.11, so I tried: <s:url id="menuUrl" namespace="/menu" action="menu"/> <s:div id="menuDiv" href="%{menuUrl}" /> Since I think sx tags only work with the Dojo plugin in Struts 2.1. However, I'm not getting any error (Java or JS), but the DIV remains desperately empty. Any idea? -----Original Message----- From: Wes Wannemacher [mailto:[EMAIL PROTECTED] Sent: 02 September 2008 02:21 To: Struts Users Mailing List Subject: Re: Include menu action with sitemesh David, I use S2 tags all the time in my sitemesh decorators. When I first did it, I hadn't put much thought into it (maybe the filter won't be available to sitemesh, the action is the decorated page, not the decorator, etc.), I just did it and it worked. It wasn't until later that I thought maybe it wasn't right. However, it worked fine and I have been happily doing it since. Rather than - <div id="menuDiv"> <s:action name="menu" /> </div> Why not use the <sx:div /> tag? http://struts.apache.org/2.x/docs/ajax-div-template.html Just be careful that the menu action does not get decorated by Sitemesh, otherwise the result can be pretty bizarre :) -Wes On Mon, 2008-09-01 at 10:50 +0100, David Loup wrote: > Hi there, > > I'm using sitemesh with struts 2 and am currently applying a decorator to all > my actions, including a static menu in a div. > > So something like > <div id="menuDiv"> > <ul> > <li>menuitem 1 </li> > <li>menuitem 2 </li> > <li>menuitem 3 </li> > </ul> > </div> > <div id=mainContent> > <decorator:body /> > </div> > > What I want to do is make that menu build dynamically to have, in spirit: > > <div id="menuDiv"> > <s :action name=menu/> > </div> > <div id=mainContent> > <decorator:body /> > </div> > > I have my menu action, which works, to display menu content in a separate > JSP. How can I "include" that action's execution in my decorator to get the > desired effect ? > > Thanks > D > > ________________________________________________________________________ > > CONFIDENTIALITY - This email and any files transmitted with it, are > confidential, may be legally privileged and are intended solely for the use > of the individual or entity to whom they are addressed. If this has come to > you in error, you must not copy, distribute, disclose or use any of the > information it contains. Please notify the sender immediately and delete them > from your system. > > SECURITY - Please be aware that communication by email, by its very nature, > is not 100% secure and by communicating with Perform Group by email you > consent to us monitoring and reading any such correspondence. > > VIRUSES - Although this email message has been scanned for the presence of > computer viruses, the sender accepts no liability for any damage sustained as > a result of a computer virus and it is the recipients responsibility to > ensure that email is virus free. > > AUTHORITY - Any views or opinions expressed in this email are solely those of > the sender and do not necessarily represent those of Perform Group. > > COPYRIGHT - Copyright of this email and any attachments belongs to Perform > Group, Companies House Registration number 6324278. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ________________________________________________________________________ CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system. SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence. VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipient?s responsibility to ensure that email is virus free. AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group. COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278. ________________________________________________________________________ CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system. SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence. VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipients responsibility to ensure that email is virus free. AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group. COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]