Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
Nightly Build
-
None
-
None
-
Operating System: All
Platform: Other
-
28609
Description
This patch brings the Struts BSF project, http://struts.sf.net/struts-bsf, into
Struts core as an optional, built-in action. It provides ScriptAction which
uses the Bean Scripting Framework, http://jakarta.apache.org/bsf, to allow the
developer to implement Struts actions using any scripting language supported by
BSF including Jython, Rhino (JavaScript), BeanShell, JRuby, and Groovy.
Feature list:
- Implement Actions with JavaScript, BeanShell, etc.
- Supports all BSF languages
- Scripts cached in memory on first use
- Ability to pass parameters to script through Struts config
- Can define custom filters to make business objects easily available
This patch requires the addition of the BSF jar, which of course is only needed
by the user if they choose to use ScriptAction. It also brings with it a small
framework for adding "filters" to put business objects into the context, among
other uses. A similiar and more capable functionality exists in the
VelocityTools project, but in its absence in Struts core, this should suffice.
I added a "bsf" package under o.a.s.actions because of the extra filter files.