There is one *huge* gripe I have about JSP that many people probably don't
care about. But if you do care about it, it can be pretty much of a
showstopper, and drive you to use Velocity instead.

The problem is that JSP *must* be invoked in a servlet request / response
environment. Why is this a problem? Here are a couple of examples:

1) You decide to use JSP to build an application in which customers may want
to modify (some of) your pages to develop their own look and feel. JSP is a
great choice, because it's standard and well known. Everybody is happy. Now
you add HTML mail notifications to your application. Customers may also want
to customise these, just as they did the web pages. But since these
notifications are not created during processing of a web request, there's no
request / response environment in which to invoke a JSP page. You have a
couple of choices - use a different templating language for mail
notifications, or make a URL request to a separate servlet that's there just
to invoke the JSP page. In the latter case, you'll likely want to add
security constraints so that external requests for that servlet can't be
made. Yuk.

2) You have a reporting web application that displays awesome reports and
charts to interactive users. Now you need to add the capability to generate
these reports in the background, because they may take a long time to
generate, and you want to be pro-active and cache them for the user.
Effectively, you're now back in the same scenario as (1), where you either
have to jump through hoops to be able to invoke a JSP page outside a request
/ response, or you need to choose a different templating language.

3) You have an application that is sufficiently dynamic that you need to be
able to generate page templates on the fly, and then invoke them. In a JSP
environment, you are now going to have to deploy the JDK, rather than just
the JRE, in a production environment, which will make a lot of IT people
very uncomfortable (if they allow it at all). In addition, you're going to
have to solve the "interesting" problem of where you can write the JSP files
to the disk such that the container will actually invoke them for you as JSP
pages. This is especially interesting if you need to do it in a portable
manner.

Don't get me wrong - I think JSP is great, especially in its 2.0 flavour, or
with JSTL. However, it has some serious limitations in certain application
scenarios. Most of its competitors, Velocity included, do not suffer from
these same kinds of issues.

--
Martin Cooper


"A.White" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Howdy

I am starting to develop an application using struts and have been
looking round the rest of the Jakarta project and came across the
Velocity project.

I was interested to see which which people recommended for a relative
newbie

Cheers

Andrew




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to