permaculture playing cards
The moose likes Servlets and the fly likes compare xslt and JSP? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "compare xslt and JSP?" Watch "compare xslt and JSP?" New topic

compare xslt and JSP?

Paul Chen

Joined: Feb 09, 2002
Posts: 8
There are two solutions to generate html:
xslt+xml generate html while jsp generate html.
Which solution is better? I guess jsp is running as servlet status once after tranlation, and xslt and xml will be translated in running period which take overload. So that the second solution has better performance than the first one.
Am I missing something? Very appreciate on correct me.
Doug Wang
Ranch Hand

Joined: Oct 05, 2001
Posts: 445
Good question. Here is already a great discussion on this topic. Go to check it.
One more question, your name doesnt agree with the name policy. To be a serious rancher here, read it carefully and reregister your name.
[ March 03, 2002: Message edited by: Doug Wang ]

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
One solution is Cocoon ( which combines xslt + xml + a jsp-like xsp language.
Although xslt does a lot of extra work compared to compiled jsp, there is a project called XSLTC to turn XSL into compiled java code. Supposedly a great speedup is possible.
Bill (currently working on a book about Cocoon)
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695


That's really interesting news about XSLTC.

I wonder how it will compare with XMLC from Enhydra?
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
I found an article on XML performance at
That shows processing times for various approaches to XML - DOM vrs SAX vrs XSLT and appears to include something on XSLTC. Incidently, Sun started the development of XSLTC and then gave the project to the Apache organization so it is open source!!
I agree. Here's the link:
subject: compare xslt and JSP?
It's not a secret anymore!