JSP gives you exactly the same capabilities as a templating language, in
fact it is a templating language.  It goes much further than that, however,
because it uses JavaBeans as backend data providers, meaning that any Bean
is usable by JSP, so really any kind or type of data can be inserted.

It is possible to put in or leave out Java code in the template.  Usually
discussions on that turn religious, so I will only mention that for the
majority most people agree that using code for presentation purposes (i.e.
looping over a set of results) is ok (i.e. maintaining the seperation of
presentation and application logic)

Presumably to do that kind of a thing (looping over a result set) is not
possible in your language, and if it is it is probably limited in some
capacity, whereas the ability to code Java directly into the template opens
up a lot of capabilities not possible with a purely templated/scripted
language (and of course leaves you enough rope to hang yourself by too!)

This is all possible with JSP 0.91 -> 1.0.

Finally we get to the latest and greatest of JSP, 1.1.  With this we should
see the best of both worlds, for really complex display purposes, we'll
probably start to see custom tag libraries, which implement elements of
logic for display (hopefully) or business (maybe) logic inside a custom tag,
which is really just a clean way to extend the original scripting language
(the most basic of which simply provides the designer with the capability to
insert elements of data retrieved or computed from some dynamic element)

Hope that helps, this topic is, as you might well imagine, discussed quite a
bit, read the archives and lurk a bit and you'll probably find a lot of
material on this topic.

-taylor

----- Original Message -----
From: Husted, Robert <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 08, 1999 11:43 AM
Subject: Re: In what ways does JSP score over Servlets ?


>     At Qwest we are using templates... HTML files with placeholders for
data
> ${MY_PLACEHOLDER}.  We store the template in memory and then insert the
data
> into the template and display it to the user.  The advantage is that our
> HTML code doesn't appear in the Servlet.  In addition, our Java code
doesn't
> appear in the template... so we've cleanly separated the Java code from
the
> HTML.
>
>     What is the advantage of using a JSP over a Servlet that uses
templates?
> As far as I can tell, there is no advantage... we've actually done a
better
> job of separating code and presentation logic using templates.  Can
someone
> give me a concrete example of when JSPs might be better than a Servlet
that
> employs templates?
>
>     Thanks,
>
>     - Robert  =)
>
>
>
>  -----Original Message-----
> From: Steve Wamsley [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, November 06, 1999 12:54 PM
> To: [EMAIL PROTECTED]
> Subject: Re: In what ways does JSP score over Servlets ?
>
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> 1. JSP's are really servlets when comes right down to it.
> 2. Do you really want to create a large-scale browser-based
> application composing all the HTML in out.println() calls?
>
> Steve Wamsley
> http://home.earthlink.net/~sswamsley
<http://home.earthlink.net/~sswamsley>
> - ----- Original Message -----
> From: Swapnil Gupta
> To: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> Sent: Saturday, November 06, 1999 12:33 AM
> Subject: In what ways does JSP score over Servlets ?
>
>
> Hello Frenz,
>                    I have gone through quite a bit of literature and
> information on JSPs and Servlets.
> I do not find very convincing as to how JSPs score any significant
> advantage over Servlets. I am aware  and understand the more common
> points where JSP does well like easy maintanence and development and
> also some built in tag based support for easy interaction with EJB.
> Besides these are there any significant gains in going for
> JSP/Servlets rather than Servlets.
>
> Thanks,
>
> Swapnil.
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 6.5.1 for non-commercial use < http://www.pgp.com
> <http://www.pgp.com> >
>
> iQA/AwUBOCSHS5aPN/z+dlkyEQJy+wCgixBL1l4Z29AqycOql58X/XgHYVcAmweG
> UZgBH1r0H8xBRNTLL3U8LhN2
> =qJdz
> -----END PGP SIGNATURE-----
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to