blob: e2d54a6b0a6163f31e19fc1d9f9f82decadc0bf2 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Content Stylesheet for Site -->
<!-- start the processing -->
<html>
<!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<meta name="author" value="Chuck Murcko">
<meta name="email" value="chuck@topsail.org">
<meta name="author" value="Victor Orlikowski">
<meta name="email" value="victor.j.orlikowski@alumni.duke.edu">
<meta name="author" value="Rony G. Flatscher">
<meta name="email" value="rony@apache.org">
<title>Jakarta BSF - Bean Scripting Framework</title>
</head>
<body bgcolor="#ffffff" text="#000000" link="#525D76">
<table border="0" width="100%" cellspacing="0">
<!-- TOP IMAGE -->
<tr>
<td align="left">
<a href="http://jakarta.apache.org"><img src="images/jakarta-logo.gif" border="0"/></a>
</td>
<td align="right">
<a href="http://jakarta.apache.org/bsf/"><img src="./images/bsf_logo.jpg" alt="Jakarta BSF" border="0"/></a>
</td>
</tr>
</table>
<table border="0" width="100%" cellspacing="4">
<tr><td colspan="2">
<hr noshade="" size="1"/>
</td></tr>
<tr>
<!-- LEFT SIDE NAVIGATION -->
<td valign="top" nowrap="true">
<p><strong>BSF Essentials</strong></p>
<ul>
<li> <a href="./index.html">Front Page</a>
</li>
<li> <a href="./bsfnews.html">News</a>
</li>
<li> <a href="./manual.html">Documentation</a>
</li>
<li> <a href="./projects.html">Related Projects</a>
</li>
<li> <a href="./resources.html">Resources</a>
</li>
<li> <a href="./faq.html">BSF FAQ</a>
</li>
<li> <a href="./problems.html">Having Problems?</a>
</li>
</ul>
<p><strong>Download</strong></p>
<ul>
<li> <a href="http://jakarta.apache.org/site/downloads/downloads_bsf.cgi">Binaries</a>
</li>
<li> <a href="http://jakarta.apache.org/site/downloads/downloads_bsf.cgi">Source Code</a>
</li>
</ul>
<p><strong>Jakarta</strong></p>
<ul>
<li> <a href="http://jakarta.apache.org/site/news.html">News & Status</a>
</li>
<li> <a href="http://jakarta.apache.org/site/mission.html">Mission</a>
</li>
<li> <a href="http://jakarta.apache.org/site/guidelines.html">Guidelines Notes</a>
</li>
<li> <a href="http://jakarta.apache.org/site/faqs.html">FAQs</a>
</li>
</ul>
<p><strong>Get Involved</strong></p>
<ul>
<li> <a href="http://jakarta.apache.org/site/getinvolved.html">Overview</a>
</li>
<li> <a href="http://jakarta.apache.org/site/cvsindex.html">Source Repositories</a>
</li>
<li> <a href="http://www.faqs.org/rfcs/rfc1855.html">Netiquette</a>
</li>
<li> <a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
</li>
<li> <a href="http://jakarta.apache.org/site/library.html">Reference Library</a>
</li>
<li> <a href="http://issues.apache.org/jira/browse/BSF">Bug Database</a>
</li>
<li> <a href="http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&type=4&pid=12310621&resolution=-1&sorter/field=issuekey&sorter/order=ASC">Enhancement Requests</a>
</li>
</ul>
</td>
<td align="left" valign="top">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Bean Scripting Framework"><strong>Bean Scripting Framework</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
Bean Scripting Framework (BSF) is a set of Java classes which provides scripting
language support within Java applications, and access to Java
objects and methods from scripting languages. BSF allows one to
write JSPs in languages other than Java while providing access to the Java
class library. In addition, BSF permits any Java application to be implemented
in part (or dynamically extended) by a language that is embedded within it.
This is achieved by providing an API that permits calling scripting
language engines from within Java, as well as an object registry that exposes
Java objects to these scripting language engines.
</p>
<p>
There are now two different versions of Apache BSF. These have different APIs.
<br />
The original version of BSF is represented by the BSF 2.x releases (current version 2.4),
and uses an API which was originally developed at IBM.
<br />
The new version of Apache BSF is represent by the 3.x releases.
The 3.x version uses the API defined as part of JSR-223 (javax.script),
which is included in Java 6 onwards.
However BSF 3.x will run on Java 1.4+, allowing access to JSR-223 scripting
for Java 1.4 and Java 5.
Apache BSF 3.x is also useful for Java 6 as it contains a command-line utility for
testing JSR-223 scripts as well as some utility classes for working with XML.
</p>
</blockquote>
</td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Supported Languages - 2.x"><strong>Supported Languages - 2.x</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
BSF 2.x supports several scripting languages currently:
<ul>
<li>
<a href="http://www.mozilla.org/rhino/">Javascript (using Rhino ECMAScript, from the Mozilla project)</a>
</li>
<li>
<a href="http://www-306.ibm.com/software/awdtools/netrexx/">NetRexx</a> (an extension of the IBM REXX scripting language in Java)
</li>
<li>
<a href="http://commons.apache.org/jexl/">Commons JEXL</a>
</li>
<li>
<a href="http://jython.sourceforge.net/">Python (using Jython) </a>
</li>
<li>
<a href="http://tcljava.sourceforge.net/">Tcl (using Jacl)</a>
</li>
<li>
<a href="http://xalan.apache.org">XSLT Stylesheets (as a component of Apache XML project's Xalan and Xerces)</a>
</li>
</ul>
</p>
<p> In addition, the following languages are supported with their own BSF engines:
<ul>
<li>
Java (using <a href="http://www.beanshell.org/">BeanShell</a>, from the BeanShell project)
</li>
<li>
<a href="http://groovy.codehaus.org/">Groovy</a>
</li>
<li>
<a href="http://groovy.codehaus.org/Groovy+Monkey">Groovy Monkey</a>
</li>
<li>
<a href="http://www.ulfdittmer.com/jlog/index.html">JLog</a> (<a href="http://jlogic.sourceforge.net/">PROLOG implemented in Java</a>)
</li>
<li>
<a href="http://jruby.codehaus.org/">JRuby</a>
</li>
<li>
<a href="http://www.judoscript.org">JudoScript</a>
</li>
<li>
<a href="http://objectscript.sourceforge.net/">ObjectScript</a>
</li>
<li>
<a href="http://www.oorexx.org/">ooRexx (Open Object Rexx)</a>, using
<a href="http://wi.wu-wien.ac.at/rgf/rexx/bsf4oorexx/current/">BSF4ooRexx</a>.
</li>
</ul>
</p>
<p>
Information on where to obtain scripting languages for use with BSF is
available on the <a href="projects.html">Related Projects</a> page.
</p>
</blockquote>
</td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Documentation (2.x)"><strong>Documentation (2.x)</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
You can view the <a href="manual.html">documentation for BSF 2.4</a>.
</p>
<p>
Documentation and examples are included in the source and binary distributions.
</p>
</blockquote>
</td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Documentation (3.x)"><strong>Documentation (3.x)</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
The following references describe the standard API (javax.script) which is implemented by BSF 3.x:
<ul>
<li><a href="http://jcp.org/aboutJava/communityprocess/final/jsr223/index.html">JSR-223 Scripting for the Java Platform</a> - specification (PDF)</li>
<li><a href="http://java.sun.com/javase/6/docs/api/javax/script/package-summary.html">Javadoc for javax.script classes</a> in Java 6</li>
<li><a href="http://java.sun.com/developer/technicalArticles/J2SE/Desktop/scripting/">Scripting for the Java platform (Sun technical article)</a></li>
</ul>
</p>
<p>
Apache BSF 3.x includes an implementation of JSR-223 (javax.script) and runs on Java 1.4 and Java 5.
(Java 6 includes javax.script as standard.)
Note that although the implementation follows the JSR-223 specification, it has not been tested against
the JSR-223 TCK.
Apache BSF 3.x can therefore not strictly be described as a compatible implementation of JSR-223,
however it is believed to be complete.
</p>
<p>
Apache BSF 3.x also includes some utility classes for working with XML.
These can be used with any used with any implementation of the javax.scripting package, including the one in Java 6+.
</p>
<p>
There is also a command-line utility which can be used to run scripts in any language engine which supports JSR-223.
</p>
<p>
Note that Apache BSF does not contain any language engines; these have to be downloaded separately.
Version 3.0 was shipped with a set of engine factories, however this is no longer present in later versions of BSF.
This is because many languages are now provided with their own factories.
<br />
Also, having all the factories in a single jar can cause problems at run-time.
If other jars contain factories that implement a different version of the same language
it may be difficult or impossible to choose which version is loaded.
<br />
If the language implementation is not present, the factory class may fail to load;
with some implementations of javax.script (e.g. Sun Java 6) this may prevent any factories from loading.
</p>
<p>
An example language which includes the necessary engine factory is:
<a href="http://commons.apache.org/jexl/">Apache Jexl 2.0</a> (requires Java 5).
Some other scripting languages also come with their own factories already included.
For example <a href="http://groovy.codehaus.org/">Groovy</a> and <a href="http://jruby.org/">JRuby</a>.
</p>
<p>
Many other languages are supported by the 3rd party engine factories available at
<a href="https://scripting.dev.java.net/">https://scripting.dev.java.net/</a>.
This provides a combined archive from which the appropriate jar for the language can be extracted.
</p>
</blockquote>
</td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Latest Release"><strong>Latest Release</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
You can download the latest release:
</p>
<ul>
<li>
<a href="http://jakarta.apache.org/site/downloads/downloads_bsf.cgi">
Download the binary release
</a>
</li>
<li>
<a href="http://jakarta.apache.org/site/downloads/downloads_bsf.cgi">
Download the source release
</a>
</li>
</ul>
</blockquote>
</td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Get Involved"><strong>Get Involved</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<ul>
<li><a href="http://jakarta.apache.org/getinvolved/getinvolvedindex.html">Get Involved</a></li>
<li><a href="http://jakarta.apache.org/getinvolved/mail.html">Join Mailing Lists</a></li>
<li><a href="http://marc.theaimsgroup.com/?l=bsf-dev&amp;r=1&amp;w=2">Search the Dev Mailing List</a>
</li>
<li><a href="http://marc.theaimsgroup.com/?l=bsf-user&amp;r=1&amp;w=2">Search the User Mailing List</a>
</li>
</ul>
</blockquote>
</td></tr>
</table>
</td>
</tr>
<!-- FOOTER -->
<tr><td colspan="2">
<hr noshade="" size="1"/>
</td></tr>
<tr><td colspan="2">
<div align="center"><font color="#525D76" size="-1"><em>
Copyright &#169; 2002-2010, Apache Software Foundation
</em></font></div>
</td></tr>
</table>
</body>
</html>
<!-- end the processing -->