You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Priya Saloni <sa...@gmail.com> on 2005/12/14 23:09:20 UTC

generel tiles question..

Hi there,

I have a web application which contains many static(HTML) and dynamic (JSP)
pages.As per thr requirement i need to have a common Menu(HTML) for all the
pages(JSPs and HTMLs).Can i use Tiles Framework for the purpose of
reusability?or the tiles framework is   used to work with JSPs?

Thanks In Advance

Priya

RE: generel tiles question..

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
Priya,

SiteMesh is different from Tiles in a two key ways:

1. Configuration:

Sitemesh currently can wrap any number of pages and page types (*.html, *.jsp, *.xhtml, *.xml, etc.) with one simple
configuration.
Tiles, on the other hand requires you to either set something up in EVERY JSP file or setup a tile for every page (such
as if you use it for page generation inside Struts).  I am not sure if this will change when Tiles becomes a fully
stand-alone project since it is currently being modified for stand-alone use.

2. Insertion of contents:

Tiles is much more flexible on which content to include in a page.  It has optional "controllers" that allow you to
insert anything anywhere before the page is rendered.

Sitemesh is much less flexible in this regard.  It comes from the fact that Sitemesh wraps the already "completed" page
before handing it back to the web server.  This makes it more difficult to insert random menus, for example, into
various parts of pages.

Since you mentioned you wanted to set the look for many static html plus dynamic JSP pages, it sounded like you might be
better served with SiteMesh wrapping all of your files automatically.  Then, you could keep each file's html down to a
simple stub of center content and let Sitemesh wrap all of your varied pages in your look right before passing them back
to your visitors/clients.

I hope this opinion helps you before you do your own research on these two products.

Regards,
David

-----Original Message-----
From: Priya Saloni [mailto:saloni.priya@gmail.com]
Sent: Wednesday, December 14, 2005 5:33 PM
To: Struts Users Mailing List
Subject: Re: generel tiles question..


Thanks David,

our application is struts based.So i thought its a good idea to go for Tiles
Framework.May i know how sitemesh is different from Tiles?

Thanks again for your response

Priya

On 12/14/05, David G. Friedman <hu...@ix.netcom.com> wrote:
>
> If you are using the menu for all pages and also want to use many static
> pages, I suggest you also look at SiteMesh.
> http://www.opensymphony.com/sitemesh/
>
> Regards,
> David
>
> -----Original Message-----
> From: Priya Saloni [mailto:saloni.priya@gmail.com]
> Sent: Wednesday, December 14, 2005 5:09 PM
> To: user@struts.apache.org
> Subject: generel tiles question..
>
>
> Hi there,
>
> I have a web application which contains many static(HTML)
> and dynamic (JSP) pages.As per thr requirement i need to
> have a common Menu(HTML) for all the pages(JSPs and
> HTMLs).Can i use Tiles Framework for the purpose of
> reusability?or the tiles framework is   used to work
> with JSPs?
>
> Thanks In Advance
>
> Priya


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: generel tiles question..

Posted by Priya Saloni <sa...@gmail.com>.
Thanks David,

our application is struts based.So i thought its a good idea to go for Tiles
Framework.May i know how sitemesh is different from Tiles?

Thanks again for your response

Priya

On 12/14/05, David G. Friedman <hu...@ix.netcom.com> wrote:
>
> If you are using the menu for all pages and also want to use many static
> pages, I suggest you also look at SiteMesh.
> http://www.opensymphony.com/sitemesh/
>
> Regards,
> David
>
> -----Original Message-----
> From: Priya Saloni [mailto:saloni.priya@gmail.com]
> Sent: Wednesday, December 14, 2005 5:09 PM
> To: user@struts.apache.org
> Subject: generel tiles question..
>
>
> Hi there,
>
> I have a web application which contains many static(HTML) and dynamic
> (JSP)
> pages.As per thr requirement i need to have a common Menu(HTML) for all
> the
> pages(JSPs and HTMLs).Can i use Tiles Framework for the purpose of
> reusability?or the tiles framework is   used to work with JSPs?
>
> Thanks In Advance
>
> Priya
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

RE: generel tiles question..

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
Martin,

Your question was excellent: can I use SiteMesh with the standard Struts taglibs?  YES.  Since SiteMesh is a filter that
sees completed web pages, I've had no problem using Struts taglibs with SiteMesh in the past.

The SiteMesh filter just allows the page, be it html, a jsp you called, a struts action, etc. to have it's final layout
modified slightly.   This allows many different types of pages (or directories, etc.) to be wrapped in your site(s)
template.  It also allows for unusual things like automatically inserting Browser specific (see the examples) code
snippets, style sheets, etc.  It can be especially easy to cobrand pages or your site using SiteMesh.  If you would like
to skim across some SiteMesh examples, a war can be found here:

https://sitemesh.dev.java.net/files/documents/887/7638/sitemesh-example.war

Regards,
David

-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Wednesday, December 14, 2005 10:45 PM
To: Struts Users Mailing List
Subject: Re: generel tiles question..


Good Evening David-
Dumb question but I have to ask
Are you restricted to just sitemesh tags in the decorator pages or can you
use struts-taglib as well?
Thanks,
Martin-
----- Original Message -----
From: "David G. Friedman" <hu...@ix.netcom.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Wednesday, December 14, 2005 5:26 PM
Subject: RE: generel tiles question..


> If you are using the menu for all pages and also want to use many static
> pages, I suggest you also look at SiteMesh.
> http://www.opensymphony.com/sitemesh/
>
> Regards,
> David
>
> -----Original Message-----
> From: Priya Saloni [mailto:saloni.priya@gmail.com]
> Sent: Wednesday, December 14, 2005 5:09 PM
> To: user@struts.apache.org
> Subject: generel tiles question..
>
>
> Hi there,
>
> I have a web application which contains many static(HTML) and dynamic
> (JSP)
> pages.As per thr requirement i need to have a common Menu(HTML) for all
> the
> pages(JSPs and HTMLs).Can i use Tiles Framework for the purpose of
> reusability?or the tiles framework is   used to work with JSPs?
>
> Thanks In Advance
>
> Priya


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: generel tiles question..

Posted by Martin Gainty <mg...@hotmail.com>.
Good Evening David-
Dumb question but I have to ask
Are you restricted to just sitemesh tags in the decorator pages or can you 
use struts-taglib as well?
Thanks,
Martin-
----- Original Message ----- 
From: "David G. Friedman" <hu...@ix.netcom.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Wednesday, December 14, 2005 5:26 PM
Subject: RE: generel tiles question..


> If you are using the menu for all pages and also want to use many static 
> pages, I suggest you also look at SiteMesh.
> http://www.opensymphony.com/sitemesh/
>
> Regards,
> David
>
> -----Original Message-----
> From: Priya Saloni [mailto:saloni.priya@gmail.com]
> Sent: Wednesday, December 14, 2005 5:09 PM
> To: user@struts.apache.org
> Subject: generel tiles question..
>
>
> Hi there,
>
> I have a web application which contains many static(HTML) and dynamic 
> (JSP)
> pages.As per thr requirement i need to have a common Menu(HTML) for all 
> the
> pages(JSPs and HTMLs).Can i use Tiles Framework for the purpose of
> reusability?or the tiles framework is   used to work with JSPs?
>
> Thanks In Advance
>
> Priya
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: generel tiles question..

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
If you are using the menu for all pages and also want to use many static pages, I suggest you also look at SiteMesh.
http://www.opensymphony.com/sitemesh/

Regards,
David

-----Original Message-----
From: Priya Saloni [mailto:saloni.priya@gmail.com]
Sent: Wednesday, December 14, 2005 5:09 PM
To: user@struts.apache.org
Subject: generel tiles question..


Hi there,

I have a web application which contains many static(HTML) and dynamic (JSP)
pages.As per thr requirement i need to have a common Menu(HTML) for all the
pages(JSPs and HTMLs).Can i use Tiles Framework for the purpose of
reusability?or the tiles framework is   used to work with JSPs?

Thanks In Advance

Priya


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org