jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eduardo Pelegri--Llopart <Eduardo.Pelegrillop...@eng.sun.com>
Subject Re: need comments on JSP tags
Date Wed, 09 Aug 2000 15:06:35 GMT
Disclaimer: I know better the JSP side than the cocoon side.

I do not know how much you are asking.  Maybe the quick answer is: when
writing a JSP tag you write the code you want to run at request time
(OK, a bit convoluted because of the event-driven model), but still
that.  In a XSP custom tag, you write an XSLT transformation that will
write the code that you want to run at request time.  In most cases the
JSP approach is easier to write.

For a longer answer:


JSP 1.1 is based on streams of characters (which in this case are
structured as a document). Cocoon is based on structured content. 
Implementation-wise Cocoon 1 is based on DOM, and Cocoon 2 (I'm not sure
what the status of that effort is) will be based on SAX events.

I was told by Stefano and PierPaolo (@ cocoon) that they were planning
(I'm unclear whether this has already happened or not?) to allow other
page languages in Cocoon, in addition to XSP, including PHP and JSP.

The custom tag mechanism in JSP is run-time based, which, IMHO, has
proven to be quite easier to program than the custom tag mechanism in
XSP, which is translation-time XSLT-based.

I don't think there is a distinctive difference in what one can
theoretically do in one versus the other.  On the JSP side we will soon
be doing a push on further improving tool support.

Performance-wise, DOM is a big memory user, SAX is not, streams are
not.  the XSLT transformations of the XSP tag libraries are at
translation-time which, in principle means they can be some more
efficient than those of JSP; I don't think we have any practical

Cocoon has a sophisticated mechanism for mapping requests to content +
filters on that content.  Some JSP container vendors have similar
mechanisms (warning: have not done a real comparison so I can't evaluate
con/pros of these). Some of this can be done within the current spec
(any takers?) but not as efficiently as one would like since the current
JSP/Servlet specifications do not provide a portable way of doing that
at the container level. Mapping is being worked on for the next releases
of JSP and Servlets.

JSP is focused on being a specification, Cocoon is focused on being a
source artifact.

There are many vendors supporting JSP containers and tools; it is nice
to see the reports (say on the struts side) of people running on other
containers - and when they do not run, we look at the spec and the
vendor will conform.

There are a number of providers of JSP tag libraries, and that will
continue to improve.


I am biased.  There are a few technical things I like better about JSP;
but the biggest benefit, IMHO, is that it is a spec-based standard and
that the industry will continue to work to improve it.

Hope this helps.

	- eduard/o

Marco.Mistroni@nokia.com wrote:
> hi all,
>         i was curious about one thing:
> which are the advantage/disadvantages of using a JSP tag for writing JSP in
> XML rather than using XSP & Cocoon???
> hope that someone can help me
> thanx in advance & regards
>         marco

View raw message