Bean Scripting Framework
The Bean Scripting Framework (BSF) enables you to use scripting language functions in your Java server-side applications. This framework also extends scripting languages so that you can use existing Java classes and Java beans in the JavaScript language. BSF in WAS supports the Rhino ECMAScript.
BSF provides an access mechanism to Java objects for the scripting languages it supports, so that both the scripting language and the Java code can access code exclusive functions. The access mechanism is implemented through a registry of objects that is maintained by BSF. With BSF, you can write scripts that create, manipulate and access values from Java objects, or you can write Java programs that evaluate and access results from scripts.
WAS provides the Bean Scripting Framework, which consists of a BSF manager, a BSF engine, and a scripting engine. (See the figure.)
See these topics for examples of using BSF with WAS:
Example: Converting JavaScript source to the Bean Scripting Framework
This example demonstrates how to convert JavaScript code into BSF code.Scenario: Creating a Bean Scripting Framework application
This scenario demonstrates how to implement a BSF application by using JavaScript code within JSP tags.See the Code example disclaimer for legal information about these code examples.
For more information about BSF, see these references: