You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Paul Higginson <Pa...@london.sparza.com> on 2000/10/05 16:17:38 UTC

server side includes Vs TagLibs

Can anyone suggest any reasons/literature on why Taglibs should be used
instead of server side includes?

thanks in advance

regards
PJH

Re: server side includes Vs TagLibs

Posted by "David M. Karr" <dk...@tcsi.com>.
>>>>> "Justyna" == Justyna Horwat <Ju...@eng.sun.com> writes:
  Justyna> It depends on what your doing. SSIs allow you to include outputs from
  Justyna> servlets at certain points in the page. You can do simple inclusions to a
  Justyna> primarily static page.

  Justyna> Custom tags are more flexible. They can be described as javabeans with
  Justyna> access to the pagecontext. Tags can be nested, set attributes, and write
  Justyna> directly to the output stream.

  Justyna> So, for instance, if you wanted to apply the model view controller pattern
  Justyna> to your web apps you'd want to separate the controller business logic from
  Justyna> the view data. Custom tags would be one way of separating the business logic
  Justyna> from the jsp view of the data.

  Justyna> Justyna
  Justyna> < horwat@eng.sun.com >

  Justyna> ----- Original Message -----
  >> Can anyone suggest any reasons/literature on why Taglibs should be used
  >> instead of server side includes?

Perhaps one simple example of the value of JSP/Taglibs over SSI would
be the "xsl:apply" tag (from the Apache general "taglibs" taglib),
which at page request time, allows us to process an XML file with an
XSL stylesheet to present truly dynamic content.

-- 
===============================================================================
David M. Karr     ; dkarr@tcsi.com  ; w:(425)487-8312 ; TCSI & Best Consulting
Software Engineer ; Unix/Java/C++/X ; BrainBench CJ12P (#12004)


Re: server side includes Vs TagLibs

Posted by Justyna Horwat <Ju...@eng.sun.com>.
It depends on what your doing. SSIs allow you to include outputs from
servlets at certain points in the page. You can do simple inclusions to a
primarily static page.

Custom tags are more flexible. They can be described as javabeans with
access to the pagecontext. Tags can be nested, set attributes, and write
directly to the output stream.

So, for instance, if you wanted to apply the model view controller pattern
to your web apps you'd want to separate the controller business logic from
the view data. Custom tags would be one way of separating the business logic
from the jsp view of the data.

Justyna
< horwat@eng.sun.com >

----- Original Message -----
> Can anyone suggest any reasons/literature on why Taglibs should be used
> instead of server side includes?
>
> thanks in advance
>
> regards
> PJH
>