blob: 71c10d2c749d947554dd6fa5f2d61489b4743c27 [file] [log] [blame]
<?xml version="1.0"?>
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
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
<author email="">Stefan Bodewig</author>
<author email="">Chuck Murcko</author>
<author email="">Victor Orlikowski</author>
<title>Frequently Asked Questions</title>
<section name="About this FAQ">
<subsection name="latest-version">
<question>Where do I find the latest version of this
<p>The latest version can always be found at BSF&apos;s homepage
<a href=""></a>.</p>
<subsection name="adding-faqs">
<question>How can I contribute to this FAQ?</question>
<p>The page you are looking it is generated from
<a href="">this</a>
document. If you want to add a new question, please submit
a patch against this document to one of BSF&apos;s mailing lists;
hopefully, the structure is self-explanatory.</p>
<p>If you don&apos;t know how to create a patch, see the patches
section of <a href="">this
<subsection name="creating-faq">
<question>How do you create the HTML version of this
<p>We use
<a href="">Anakia</a>
to render the HTML version from the original XML file.</p>
<p>The Velocity stylesheets used to process the XML files can
be found in the <code>xdocs/stylesheets</code> subdirectory of
BSF&apos;s CVS repository - the build file <code>docs.xml</code> is
used to drive Anakia. This file assumes that you have the
<code>jakarta-site2</code> module checked out from CVS as
well, but if you follow the instruction from Anakia&apos;s
homepage, you should get it to work without that. Just make
sure all required jars are in the task&apos;s classpath.</p>
<section name="General">
<subsection name="what-is-bsf">
<question>What is Bean Scripting Framework?</question>
Bean Scripting Framework (BSF) is a set of Java classes which provides
scripting language support within Java applications. It also provides
access to Java objects and methods from supported 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.
<subsection name="bsf-name">
<question>Why do you call it BSF?</question>
It's the beanage. Beans were the cool thing when BSF was first being
designed, and BSF contains several flavors.
<subsection name="history">
<question>Tell us a little bit about BSF&apos;s history.</question>
BSF began life in 1999 as a research project of Sanjiva Weerawarana
at IBM's T.J. Watson Research Center. The initial intent had been
to provide access to JavaBeans from scripting language environments
(though there is nothing limiting access only to Java Beans). It was
soon moved to IBM's AlphaWorks developer site, where significant
interest (both internal and external to IBM) led to its being
moved to IBM's developerWorks site, where BSF could operate as an
open source project. During this time, significant development was
done by Matt Duftler and Sam Ruby, and BSF was incorporated into
both IBM products (Websphere) and Apache projects (Xalan). It was
this interest on the part of the Apache Software Foundation that
ultimately led to BSF's acceptance as a subproject of Jakarta in
During the process of moving BSF to Jakarta, development continued
within IBM, with further improvements to BSF's integration with
Jasper being made by John Shin and the addition of debugging support
for the Javascript language (a team effort, resulting from the work
of IBM researchers Olivier Gruber, Jason Crawford, and John Ponzo,
and IBM software developers Chuck Murcko and Victor Orlikowski).
It is the current version, 2.3, that has been donated to Apache
Software Foundation from IBM.
<section name="Installation">
<subsection name="no-gnu-tar">
<question>I get checksum errors when I try to extract the
<code>tar.gz</code> distribution file. Why?</question>
<p>BSF&apos;s distribution contains file names that are longer
than 100 characters, which is not supported by the standard
tar file format. Several different implementations of tar use
different and incompatible ways to work around this
<p>BSF&apos;s &lt;tar&gt; task can create tar archives that use
the GNU tar extension, and this has been used when putting
together the distribution. If you are using a different
version of tar (for example, the one shipping with Solaris),
you cannot use it to extract the archive.</p>
<p>The solution is to either install GNU tar, which can be
found <a href="">here</a>,
or use the zip archive instead (you can extract it using
<code>jar xf</code>).</p>
<section name="How do I ...">
<subsection name="doh">
<question>How do I install BSF?</question>
BSF can be used standalone, as a class library, or as part of an
application server. In order to be used as a class library or as
a standalone system, one simply downloads a copy of the bsf.jar
file from the
<a href="">BSF web site</a>
and includes it in their classpath, along with any required classes
or jar files for the desired languages.
In order to use BSF as part of the
<a href="">Tomcat</a>
servlet engine, one must currently download patches from the BSF
web site that permit Jasper to call BSF. Instructions for this will be
posted on the website, and will be accompanied by prebuilt binaries.
We hope that these changes will be merged into Tomcat in the near
<section name="It doesn&apos;t work (as expected)">
<subsection name="winzip-lies">
<question>BSF creates JAR files with a lower-case
<code>meta-inf</code> directory.</question>
<p>No it doesn't.</p>
<p>You may have seen these lower-case directory names in
WinZIP, but WinZIP is trying to be helpful (and fails). If
WinZIP encounters a filename that is all upper-case, it
assumes it has come from an old DOS box andchanges the case to
all lower-case for you.</p>
<p>If you extract (or just check) the archive with jar, you
will see that the names have the correct case.</p>
<section name="Advanced Issues">
<subsection name="TBD2">
To be added
To be added
<section name="Known Problems">
<subsection name="javadoc-cannot-execute">
<question>Javadoc failed: javadoc: cannot execute</question>
<p>There is a bug in the Solaris reference implementation of
the JDK (see <a href=""></a>).
This also appears to be true under Linux. Moving the JDK to
the front of the PATH fixes the problem.</p>