[BSF,Tomcat] ad JSR-223 taglib for Tomcat ... (Re: Question ad alternative of BSF taglib in Tomcat ? [Fwd: In the move of some taglibs to Tomcat, the BSF taglib got retired]

2010-08-04 Thread Rony G. Flatscher (Apache)
Resending attempt.


Hi Henri,

relating to our conversation of last fall, I just wanted to point out
that Mr. Ryabenkiy posts of today (copied at the end to inform the
BSF-community) fulfills the idea of creating a jsr-223 taglib for Tomcat.

He applies the Apache License 2.0 to his work, such that it can be taken
on by ASF.

The Quercus/Resin
http://www.caucho.com/resin-3.0/quercus/tutorial/module/index.xtp
package Mr. Ryabenkiy refers to is used in his work as proof of concept
to use PHP scripts in Tomcat served JSP (which might be quite
interesting for PHP-acquantied programmers, who have no expert knowledge
of Java) !
(He also uses the scripting language ooRexx as a proof of concept for
which he wrote a JSR-223 engine.)

In effect all scripting languages can be used, that adhere to Java 6
scripting a.k.a. JSR-223 with his taglib to create scripts for JSP. It
would even be possible to use multiple scripts in different languages
for the same JSP.

It will (again) allow for JSP and Java what ASP allows for the MS world.

---rony



On 13.10.2009 08:17, Rony G. Flatscher (Apache) wrote:
 Henri Yandell wrote:
   
 Not sure where Christopher's email was, but:

 If there is any interest in a retired taglib, I'm all for it being
 merged into the Extended Taglib. Currently I plan to consider
 replacing the functionality from String Taglib (mostly as EL
 functions), Log Taglib and JNDI Taglib (perhaps).

 It sounds like BSF taglib, given it has only the two tags, might be
 very interesting if a dependency on BSF itself can be avoided (ie:
 base it on javax.script).
   
 
 +1

 If you include just the taglib (the JSR-223 to be created), then its
 usage would be restricted to Java 6 and up, such that current Java 1.4
 and 1.5 installations in the field could not take advantage of it.

 To cover Java 1.4 and 1.5 BSF 3.0 got created, which implements the
 javax.script specifications. If BSF 3.0 is included then the scripting
 support will be available from Java 1.4 on. Starting with Java 6 the
 Java 6 javax.script would prevail due to using its own package by
 placement of the classes.

 ---rony


 cut here, Mr. Ryabenskiy post of 2010-08-04
--
 Original Message 
Subject:New taglib to script JSP pages in languages other than Java
Date:   Wed, 4 Aug 2010 09:49:20 +0200
From:   Stanislav Ryabenkiy stani.ryaben...@gmail.com
To: taglibs-u...@tomcat.apache.org, d...@tomcat.apache.org



Hello,

as I haven't posted here before, I hope I won't make a mistake by
posting to both of these lists. IMHO, this announcement is relevant to
both communities.

This is to inform the taglibs-user and tomcat-dev communities of a
small new taglib which allows to script JSP pages in laqnguages other
than Java. Scriptlets and expressions using the taglib have access to
the same implicit objects normal JSP scriptlets have access to.
Internally, the taglib only depends on the javax.script interface
defined as part of JSR-223 and included in Java 6 onwards, although it
can also work with other implementations of javax.script on earlier
version of Java (such as, for instance, Bean Scripting Framework 3).
So for people who want to include scripts in their JSP pages, any
scripting language that exposes a javax.script interface can be used.

Given the nature of the project, and the existence of partial
alternatives at least for some languages (such as Quercus/Resin), I
expect interest to be quite small (if any), but if there's any
interest it could be included in the newly re-organized Extended
Taglib. Ideally, I would want Tomcat to support this kind of
functionality natively via the language attribute of the page
directive, but the taglib at least offers a simpler and
container-independent solution.

Source code can be found at:
http://stani.ryabenkiy.com/downloads/releases/script-taglib-1.0.tar.gz
The related thesis paper (with source code in appendix):
http://stani.ryabenkiy.com/downloads/papers/scripting_thesis.pdf

Kind Regards,
Stani




Re: Question ad alternative of BSF taglib in Tomcat ? [Fwd: In the move of some taglibs to Tomcat, the BSF taglib got retired]

2009-10-13 Thread Rony G. Flatscher (Apache)

Henri Yandell wrote:
 Not sure where Christopher's email was, but:

 If there is any interest in a retired taglib, I'm all for it being
 merged into the Extended Taglib. Currently I plan to consider
 replacing the functionality from String Taglib (mostly as EL
 functions), Log Taglib and JNDI Taglib (perhaps).

 It sounds like BSF taglib, given it has only the two tags, might be
 very interesting if a dependency on BSF itself can be avoided (ie:
 base it on javax.script).
   
+1

If you include just the taglib (the JSR-223 to be created), then its
usage would be restricted to Java 6 and up, such that current Java 1.4
and 1.5 installations in the field could not take advantage of it.

To cover Java 1.4 and 1.5 BSF 3.0 got created, which implements the
javax.script specifications. If BSF 3.0 is included then the scripting
support will be available from Java 1.4 on. Starting with Java 6 the
Java 6 javax.script would prevail due to using its own package by
placement of the classes.

---rony




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Question ad alternative of BSF taglib in Tomcat ? [Fwd: In the move of some taglibs to Tomcat, the BSF taglib got retired]

2009-10-11 Thread Rony G. Flatscher (Apache)
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 

Question ad alternative of BSF taglib in Tomcat ? [Fwd: In the move of some taglibs to Tomcat, the BSF taglib got retired]

2009-10-09 Thread Rony G. Flatscher (Apache)
Hi there,

not sure whether this is a user or dev question, hence sending it to
both, please forgive, if wrong.

Learning about the finalization of moving taglib from jakarta to tomcat,
one could also learn that the BSF taglib got retired in the process.
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 (did a coarse research on
that issue, but did not find any info on this) I created the enclosed
e-mail to the BSF user and dev list to make sure, that users of the BSF
taglib learn about where it has moved to, in case it is still needed.

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. 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!).

TIA,

---rony

P.S.: If the BSF taglib is still needed, then one more (dev) point to
discuss/raise would be to create in a addition a new JSR-223/BSF3 taglib
for the newly released BSF 3.0, which implements the JSR-223
(javax.script) specs. Unlike JSR-223, which is only available starting
with Java 6, BSF 3 supplies the same functionality for Java 1.4
installations or higher, making it a very attractive technology for Java
1.4 and 1.5 installations, as they gain the standard scripting APIs with
it. There would be more to this, but should only be discussed, if a need
for this exists.


 Original Message 
Subject:In the move of some taglibs to Tomcat, the BSF taglib got 
retired
Date:   Fri, 09 Oct 2009 12:18:31 +0200
From:   Rony G. Flatscher rony.flatsc...@wu-wien.ac.at
Reply-To:   Bean Scripting Framework developers bsf-...@jakarta.apache.org
To: Bean Scripting Framework developers bsf-...@jakarta.apache.org,
Bean Scripting Framework users bsf-u...@jakarta.apache.org



Hi there,

just learned from the announcement that in the process of moving taglibs
from Jakarta to Tomcat a lot of taglibs got retired, among them the BSF
taglib.

Not sure at the moment how Tomcat will allow for creating JSPs that
embed code in scripting languages, which was one of the original
applications of BSF, when it was originally developed at IBM (as a
matter of fact, IBM's WebSphere distributed BSF in order to enable Java
Server Page authors to embed scripts in any of its supported scripting
languages, very much like MS allows for in their ASPs).

So for those who have a need for the BSF taglib, here the relevant links:

Information about BSF taglib and examples on how to use it:

http://jakarta.apache.org/taglibs/doc/bsf-doc/

Download BSF taglib from:

http://svn.apache.org/repos/asf/jakarta/taglibs/deprecated/bsf/trunk/

Retired taglibs as of 2009-10:

http://jakarta.apache.org/site/retired-taglibs.html

---rony





Re: Question ad alternative of BSF taglib in Tomcat ? [Fwd: In the move of some taglibs to Tomcat, the BSF taglib got retired]

2009-10-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rony,

On 10/9/2009 7:30 AM, Rony G. Flatscher (Apache) wrote:
 Learning about the finalization of moving taglib from jakarta to
 tomcat, one could also learn that the BSF taglib got retired in the
 process.

Yup.

 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.

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.

Note that the jakarta-taglibs-BSF project hadn't had a news announcement
since 2002, so it was pretty much already dead.

 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.

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?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrPpJQACgkQ9CaO5/Lv0PCu7QCfSsq5a606rBek1te/912L5P5B
pNoAnjg/w9EeYHoV7/yr43udCuNa7NRp
=ImL8
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org