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 WebSphere Application Server - Express for iSeries 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.
WebSphere Application Server - Express provides the Bean Scripting Framework, which consists of a BSF manager, a BSF engine, and a scripting engine. (See the figure.)
See these examples of using BSF with WebSphere Application Server - Express:
Example: Convert JavaScript source to the Bean Scripting Framework
This example demonstrates how to convert JavaScript code into BSF code.Scenario: Create 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: