Before getting into the details of using Struts Scripting, it's necessary to give a brief overview of BSF. BSF is a scripting framework that allows scripting languages to be leveraged by Java applications. As part of this, BSF allows scripting languages to access Java objects and methods. BSF by default supports many popular scripting languages. The following table lists the default scripting languages supported by BSF along with their associated file extension(s).
Language | File Extension(s) |
---|---|
beanbasic | bb |
beanshell | bsh |
bml | bml |
jacl | jacl |
java | java |
javaclass | class |
javascript | js |
jpython | py |
jscript | jss |
judoscript | jud, judo |
jython | py |
lotusscript | lss |
netrexx | nrx |
perl | pl |
perlscript | pls |
pnuts | pnut |
ruby | rb |
vbscript | vbs |
xslt | xslt |
Languages not supported by default by BSF can be plugged into BSF by providing a BSF engine for the given language. For more details on BSF, see the BSF Web site: http://jakarta.apache.org/bsf/.