You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by bhaarat Sharma <bh...@gmail.com> on 2008/01/10 20:40:36 UTC

worth spending time in sitemesh?

Helloo

we have an application that is using servlets and some struts2.

We have a problem where we need to add a code snippet in all our
printer friendly pages (current date and logged in user id).  We have
over 30 printer friendly pages.

I have not invested a lot of time with sitemesh but just browsed over
it as reading struts 2 tutorials.

Can someone please tell me if we should be looking at sitemesh to
solve this problem..rather than opening each printer friendly page and
adding code to it to show current date and logged in user.

I\'d appreciate any help/hint

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


Re: worth spending time in sitemesh?

Posted by bhaarat Sharma <bh...@gmail.com>.
thanks,

this *one* jsp would have the stuff coming from DB but still will need to be
included as <jsp:include in all other pages, right.

Thanks also to people with suggestions on sitemesh. I am going to try it
this weekend.



On Jan 11, 2008 8:41 AM, Antonio Petrelli <an...@gmail.com>
wrote:

> 2008/1/10, bhaarat Sharma <bh...@gmail.com>:
> > We have a problem where we need to add a code snippet in all our
> > printer friendly pages (current date and logged in user id).  We have
> > over 30 printer friendly pages.
> >
> > I have not invested a lot of time with sitemesh but just browsed over
> > it as reading struts 2 tutorials.
> >
> > Can someone please tell me if we should be looking at sitemesh to
> > solve this problem..rather than opening each printer friendly page and
> > adding code to it to show current date and logged in user.
>
> Probably you won't need sitemesh, but only *one* JSP that includes the
> text at the right place, if you are taking your text from a DB.
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
-bhaarat

Re: worth spending time in sitemesh?

Posted by Antonio Petrelli <an...@gmail.com>.
2008/1/10, bhaarat Sharma <bh...@gmail.com>:
> We have a problem where we need to add a code snippet in all our
> printer friendly pages (current date and logged in user id).  We have
> over 30 printer friendly pages.
>
> I have not invested a lot of time with sitemesh but just browsed over
> it as reading struts 2 tutorials.
>
> Can someone please tell me if we should be looking at sitemesh to
> solve this problem..rather than opening each printer friendly page and
> adding code to it to show current date and logged in user.

Probably you won't need sitemesh, but only *one* JSP that includes the
text at the right place, if you are taking your text from a DB.

Antonio

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


Re: worth spending time in sitemesh?

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
If you just want to add, say, a header or footer (decoration) around the 
head or body content of the pages then sitemesh is absolutely perfect 
for the job.  You won't need to modify the pages at all, it'll just 
decorate them based in your decorator template.  You'd be able to have 
this working in less than 30 mins sight unseen.

Tiles is good when you want to resuse common components in the pages 
(lets call them tiles in the page).  That doesn't sound like what you're 
doing.

bhaarat Sharma wrote:
> but do you think I will be able resolve my problem of 'not touching 30
> different pages for the same thing.
>
> In tiles or sitemesh...is it possible to make a page, say A,....add some
> stuff in it and then in an xml file or something.. give the name of pages to
> which 'A' should append to?
>
> hmm that sounds rather vague. maybe in my case there is no other way than to
> do the same thing on each page?
>
> On Jan 10, 2008 10:06 PM, Rick Reumann <ri...@gmail.com> wrote:
>
>   
>> I prefer Tiles to Sitemesh. Sitemesh is easier to use (at least easier
>> than
>> Tiles1, haven't tried Tiles2 yet). The reason I like Tiles better is for
>> performance. Sitemesh buffers the entire before it can output the content.
>> This chews up a lot of memory on large pages. For smaller pages, the
>> memory
>> footprint is probably negligible, but I'd rather not take the chance.
>>
>> On Jan 10, 2008 2:40 PM, bhaarat Sharma <bh...@gmail.com> wrote:
>>
>>     
>>> Helloo
>>>
>>> we have an application that is using servlets and some struts2.
>>>
>>> We have a problem where we need to add a code snippet in all our
>>> printer friendly pages (current date and logged in user id).  We have
>>> over 30 printer friendly pages.
>>>
>>> I have not invested a lot of time with sitemesh but just browsed over
>>> it as reading struts 2 tutorials.
>>>
>>> Can someone please tell me if we should be looking at sitemesh to
>>> solve this problem..rather than opening each printer friendly page and
>>> adding code to it to show current date and logged in user.
>>>
>>> I\'d appreciate any help/hint
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>       
>> --
>> Rick
>>
>>     
>
>   
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.516 / Virus Database: 269.19.0/1218 - Release Date: 10/01/2008 1:32 PM
>   


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


Re: worth spending time in sitemesh?

Posted by bhaarat Sharma <bh...@gmail.com>.
but do you think I will be able resolve my problem of 'not touching 30
different pages for the same thing.

In tiles or sitemesh...is it possible to make a page, say A,....add some
stuff in it and then in an xml file or something.. give the name of pages to
which 'A' should append to?

hmm that sounds rather vague. maybe in my case there is no other way than to
do the same thing on each page?

On Jan 10, 2008 10:06 PM, Rick Reumann <ri...@gmail.com> wrote:

> I prefer Tiles to Sitemesh. Sitemesh is easier to use (at least easier
> than
> Tiles1, haven't tried Tiles2 yet). The reason I like Tiles better is for
> performance. Sitemesh buffers the entire before it can output the content.
> This chews up a lot of memory on large pages. For smaller pages, the
> memory
> footprint is probably negligible, but I'd rather not take the chance.
>
> On Jan 10, 2008 2:40 PM, bhaarat Sharma <bh...@gmail.com> wrote:
>
> > Helloo
> >
> > we have an application that is using servlets and some struts2.
> >
> > We have a problem where we need to add a code snippet in all our
> > printer friendly pages (current date and logged in user id).  We have
> > over 30 printer friendly pages.
> >
> > I have not invested a lot of time with sitemesh but just browsed over
> > it as reading struts 2 tutorials.
> >
> > Can someone please tell me if we should be looking at sitemesh to
> > solve this problem..rather than opening each printer friendly page and
> > adding code to it to show current date and logged in user.
> >
> > I\'d appreciate any help/hint
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> Rick
>

Re: worth spending time in sitemesh?

Posted by Rick Reumann <ri...@gmail.com>.
I prefer Tiles to Sitemesh. Sitemesh is easier to use (at least easier than
Tiles1, haven't tried Tiles2 yet). The reason I like Tiles better is for
performance. Sitemesh buffers the entire before it can output the content.
This chews up a lot of memory on large pages. For smaller pages, the memory
footprint is probably negligible, but I'd rather not take the chance.

On Jan 10, 2008 2:40 PM, bhaarat Sharma <bh...@gmail.com> wrote:

> Helloo
>
> we have an application that is using servlets and some struts2.
>
> We have a problem where we need to add a code snippet in all our
> printer friendly pages (current date and logged in user id).  We have
> over 30 printer friendly pages.
>
> I have not invested a lot of time with sitemesh but just browsed over
> it as reading struts 2 tutorials.
>
> Can someone please tell me if we should be looking at sitemesh to
> solve this problem..rather than opening each printer friendly page and
> adding code to it to show current date and logged in user.
>
> I\'d appreciate any help/hint
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Rick