tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rony G. Flatscher (Apache)" <r...@apache.org>
Subject Re: Question ad alternative of BSF taglib in Tomcat ? [Fwd: In the move of some taglibs to Tomcat, the BSF taglib got retired]
Date Sun, 11 Oct 2009 11:31:28 GMT
Christopher,

thanks for your information!

> > AFAIK the BSF taglib has been allowing one to add code in all of the
> > BSF supported scripting languages to JSPs. Not knowing, wheter there
> > are alternatives available in the current Tomcat
>
> Tomcat itself contains little in the way of tag libraries, except for
> the JSTL required by the JSP 2.1 specification (and higher).
>
> > In case the BSF taglib is needed for adding scripts in scripting
> > languages to JSPs, I would kindly suggest to not retire it, but to
> > keep it available for interested parties in the Tomcat realm.
>
> So, let me clear a few things up:
>
> 1. The Tomcat team didn't retire the BSF tag library. The Jakarta BSF
> tag library folks retired it. You should complain to them.
They are all off (enjoying retirement) ...
;-)

> 2. The Apache Software Foundation (ASF) never deletes code forever. Just
> because it's retired doesn't mean it's no longer available: it just
> means that they will no longer be maintaining it by adding features,
> fixing bugs, or answering questions about it.
Yes, but the semantics of "retirement" indicates that they go out of
service (are not useful in todays world anymore).

> Note that the jakarta-taglibs-BSF project hadn't had a news announcement
> since 2002, so it was pretty much already dead.
Yes, but does that mean it is not useful anymore, needs to get retired,
has become irrelevant?

In this particular case it is just a sign that this particular
functionality has become stable and there has not been a need to add new
functionality (what functionality would have been needed in this taglib,
other than enabling scripting languages to become usable to create
scripts embedded in JSPs) ?

Coming from BSF (which BSF taglib exploits) it is not clear to me,
whether Tomcat users have been exploiting this taglib or not (actually,
if it gets retired, this means that either the taglib is not needed
anymore, because of an alternative technology put in place, or the
taglib has not been exploited, used at all).

> > In case there are alternatives available in Tomcat to the BSF taglib,
> > please be so kind and point them out (just short pointers would
> > suffice!).
>
> What is it that you are trying to do, exactly? It's possible that simply
> using the BSF library directly (without a tag library) is your best
> option. There was a fad for a while where everything was being wrapped
> into a tag library and JSP was starting to look like ColdFusion. CF was
> eventually re-implemented in Java using JSP tag libraries so I guess JSP
> had the last laugh.
>
> I never thought non-UI-related tag libraries had any business existing
> because I firmly believe in separation between model/controller and
> view: the view simply should not be sending emails, communicating with
> databases (at least not directly), sending JMS messages, or copying
> files around.
E.g. if you look into the MS world you will immediately stumble over
tons of ASPs which employ tons (even a mix) of scripting languages.
Scripting languages in that world empower even end-user kind of
programmers to quickly and easily insert code in a language they can
master for web-based applications (and again, they take advantage of
that possibility). (There are more reasons, arguments, why it may
actually make sense to allow scripting languages to be used in server
pages, of cours.)

Also, experts in once scripting language are enabled to apply their
knowledge for Web apps by creating the needed logic in their scripting
language for server pages, removing the need for them to learn a new
programming language. (Again, there are other good reasons as well.)

> If you want to use another scripting language to generate content, then
> why bother with JSP in the first place? Why not use a tool geared
> towards allowing you to use your scripting-language of choice outside of
> a JSP context?
This would lead to environments that lock-in the developers in specific
environments, which only are available for themselves (cf. PHP, Ruby,
etc. environments). Having an established and proven environment
available, like Tomcat, making it possible to mix-in code in scripting
languages, would be a boon.

If it is possible to include script code into JSPs, then why not allow
for that? The BSF taglib would allow for that, making it possible to
mix-and-match all supported scripting languages in JSPs. (And again,
there may be many different reasons for doing that.)

---

Having said all that I would like to make sure that I have no intentions
to run (or start) a "war of opinions". It is o.k. with me if I learn
that currently in Tomcat this functionality is not really seen as a
benefit for Tomcat (hence not taking over the BSF taglib, but instead
letting it retire).

---rony

P.S.: As long as the BSF taglib can be used with Tomcat, users who have
a need to use scripts in JSPs will be able to do so (if they know that
this is possible exists in the first place).

P.P.S.: Also in the controller (citing your MVC argument above) you
could use scripts, for that the BSF package itself is the enabler. Using
the latest BSF 3.0 you would use the javax.script interfaces of Java 6
in earlier versions of Java (1.4 or up), which also might be
interesting, if you have people on the team who are scripting experts or
if you want to take advantage of existing script packages for one reason
or another.




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message