Quoting Gupta, Lokesh ([EMAIL PROTECTED]):
> Is it correct to say that both JSP and Servlet Templates are a way to
> separate out your HTML code from the servlet code? If that were true, then
> what are the advantages or disadvantages to using Servlet Templates as
> opposed to JSP? I personally feel that Servlet Templates are a better way to
> separate HTML from Java.
>
> Thanks and regards,
>
> Lokesh

You could view JSP as a kind of template language. However, it also
encourages you to stick Java into the JSP code, so you would be tempted
to mix code.

The big advantage of JSP is that Sun is pushing it hard, so you are
likely to see some support for it materialize in some IDEs eventually.
The big disadvantage of JSP is that you require vendor support in
order to use it, whereas servlet templates work anywhere the JSDK does.

The big advantage of templates is that they tend NOT to be monolithic,
meaning that you can use them as just one tool among several inside
your servlet--you don't have to use the template unless it's the
appropriate solution, even within a single request. The big disadvantage
is that since none of them are being pushed by Sun, the syntax varies
a bit from one template solution to the next.

Obviously I prefer templates, as I wrote the WebMacro template engine
which is freely available from the URL below :-)

Justin

- - -
WebMacro Servlet Framework
http://webmacro.org

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to