To solve the problem of headers, footer, layouts accross a web site i use sitemesh. I have several layouts, one two and three columns layouts...I applied this layouts to my pages...
I think its a good solution to your problem... Here is the url http://www.opensymphony.com/sitemesh/ Regards Juan -----Mensaje original----- De: meeboo [mailto:[EMAIL PROTECTED] Enviado el: viernes, 30 de marzo de 2007 11:09 Para: user@struts.apache.org Asunto: RE: Common header and footer html Is there a good way of achieving this in Struts 2 without using Tiles? I'm new to Struts and coming from a Tapestry background my first hunch was to create classes for a header and a footer element, but is this even a viable option in an action based framework? If not, what's the best practice when you're faced with implementing such a thing? Cheers Raghupathy, Gurumoorthy wrote: > > http://struts.apache.org/1.x/struts-tiles/ is your answer.... > > Regards > Guru > > > -----Original Message----- > From: Ståle Undheim [mailto:[EMAIL PROTECTED] > Sent: 30 March 2007 13:55 > To: user@struts.apache.org > Subject: Common header and footer html > > Currently, all my jsp pages are structured like this: > * identical html header and <body> tag ... > * page specific content > * identical trail of </body> and </html> > > Instead of copying this for every file, I would like to have 1 common > outer wrapper file, that includes a jsp based on the action or > something. > > I have been looking at the tiles plugin, but I couldn't make out > enough from the documentation to see how I could use it. > > My ideal solution would be something like having a layout.jsp that > looks like this: > <DOCTYPE> > <html> > <head></head> > <body> > <% include jsp based on ActionName or an annotation, or that I can set > with an interceptor of sorts. %> </body> </html> > > --------------------------------------------------------------------- > 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] > > > -- View this message in context: http://www.nabble.com/Common-header-and-footer-html-tf3492025.html#a9753895 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.22/739 - Release Date: 29/03/2007 13:36 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.22/739 - Release Date: 29/03/2007 13:36 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]