The following document contains the results of RAT (Release Audit Tool).
***************************************************** Summary ------- Notes: 10 Binaries: 4 Archives: 8 Standards: 135 Apache Licensed: 97 Generated Documents: 0 JavaDocs are generated and so license header is optional Generated files do not required license headers 38 Unknown Licenses ******************************* Archives (+ indicates readable, $ unreadable): + lib/commons-collections-3.1.jar + lib/commons-logging-1.0.4.jar + lib/jdom-b9.jar + lib/junit-3.8.2.jar + lib/log4j-1.2.12.jar + lib/velocity-1.4.jar + lib/xalan-2.7.0.jar + lib/xerces-2.4.0.jar ***************************************************** Files with AL headers will be marked L Binary files (which do not require AL headers) will be marked B Compressed archives will be marked A Notices, licenses etc will be marked N N AUTHORS.txt AL build-properties.xml AL build.xml N BUILDING.txt !????? CHANGES.txt AL doap_bsf.rdf AL docs/bsfnews.html AL docs/faq.html B docs/images/bsf_logo.jpg B docs/images/jakarta-logo.gif AL docs/index.html AL docs/manual.html AL docs/problems.html AL docs/projects.html AL docs/resources.html N INSTALL.txt A lib/commons-collections-3.1.jar A lib/commons-logging-1.0.4.jar A lib/jdom-b9.jar A lib/junit-3.8.2.jar A lib/log4j-1.2.12.jar A lib/velocity-1.4.jar A lib/xalan-2.7.0.jar A lib/xerces-2.4.0.jar N LICENSE.txt N NOTICE.txt AL pom.xml N README.txt AL RELEASE-NOTE.txt !????? samples/bsh/calculator.jacl !????? samples/bsh/calculator.js !????? samples/bsh/calculator.py AL samples/bsh/calculator.rex !????? samples/bsh/download.js AL samples/bsh/download.rex N samples/bsh/readme N samples/calc/readme !????? samples/calc/TestCalc.java AL samples/calc/TestCalc.rex N samples/scriptedui/readme !????? samples/scriptedui/ScriptedUI.java !????? samples/scriptedui/ui.jacl !????? samples/scriptedui/ui.js !????? samples/scriptedui/ui.nrx !????? samples/scriptedui/ui.py AL samples/scriptedui/ui.rex N samples/xsl/readme !????? samples/xsl/style1.xsl !????? samples/xsl/style2.xsl !????? samples/xsl/table-data.xml !????? samples/xsl/TableFiller.java !????? samples/xsl/TableFiller.jrexx !????? src/log4j.properties AL src/main/java/org/apache/bsf/BSFDeclaredBean.java AL src/main/java/org/apache/bsf/BSFEngine.java AL src/main/java/org/apache/bsf/BSFException.java AL src/main/java/org/apache/bsf/BSFManager.java AL src/main/java/org/apache/bsf/BSF_Log.java AL src/main/java/org/apache/bsf/BSF_LogFactory.java AL src/main/java/org/apache/bsf/engines/jacl/BSFCommand.java AL src/main/java/org/apache/bsf/engines/jacl/JaclEngine.java AL src/main/java/org/apache/bsf/engines/java/JavaEngine.java AL src/main/java/org/apache/bsf/engines/javaclass/JavaClassEngine.java AL src/main/java/org/apache/bsf/engines/javascript/JavaScriptEngine.java AL src/main/java/org/apache/bsf/engines/jexl/JEXLEngine.java AL src/main/java/org/apache/bsf/engines/jython/JythonEngine.java AL src/main/java/org/apache/bsf/engines/netrexx/NetRexxEngine.java AL src/main/java/org/apache/bsf/engines/xslt/XSLTEngine.java AL src/main/java/org/apache/bsf/engines/xslt/XSLTResultNode.java AL src/main/java/org/apache/bsf/Languages.properties AL src/main/java/org/apache/bsf/Main.java AL src/main/java/org/apache/bsf/util/Bean.java AL src/main/java/org/apache/bsf/util/BSFClassLoader.java AL src/main/java/org/apache/bsf/util/BSFEngineImpl.java AL src/main/java/org/apache/bsf/util/BSFEventProcessor.java AL src/main/java/org/apache/bsf/util/BSFEventProcessorReturningEventInfos.java AL src/main/java/org/apache/bsf/util/BSFFunctions.java AL src/main/java/org/apache/bsf/util/cf/CFDriver.java AL src/main/java/org/apache/bsf/util/cf/CodeFormatter.java AL src/main/java/org/apache/bsf/util/CodeBuffer.java AL src/main/java/org/apache/bsf/util/EngineUtils.java AL src/main/java/org/apache/bsf/util/event/adapters/java_awt_event_ActionAdapter.java AL src/main/java/org/apache/bsf/util/event/adapters/java_awt_event_AdjustmentAdapter.java AL src/main/java/org/apache/bsf/util/event/adapters/java_awt_event_ComponentAdapter.java AL src/main/java/org/apache/bsf/util/event/adapters/java_awt_event_ContainerAdapter.java AL src/main/java/org/apache/bsf/util/event/adapters/java_awt_event_FocusAdapter.java AL src/main/java/org/apache/bsf/util/event/adapters/java_awt_event_ItemAdapter.java AL src/main/java/org/apache/bsf/util/event/adapters/java_awt_event_KeyAdapter.java AL src/main/java/org/apache/bsf/util/event/adapters/java_awt_event_MouseAdapter.java AL src/main/java/org/apache/bsf/util/event/adapters/java_awt_event_MouseMotionAdapter.java AL src/main/java/org/apache/bsf/util/event/adapters/java_awt_event_TextAdapter.java AL src/main/java/org/apache/bsf/util/event/adapters/java_awt_event_WindowAdapter.java AL src/main/java/org/apache/bsf/util/event/adapters/java_beans_PropertyChangeAdapter.java AL src/main/java/org/apache/bsf/util/event/adapters/java_beans_VetoableChangeAdapter.java AL src/main/java/org/apache/bsf/util/event/EventAdapter.java AL src/main/java/org/apache/bsf/util/event/EventAdapterImpl.java AL src/main/java/org/apache/bsf/util/event/EventAdapterRegistry.java AL src/main/java/org/apache/bsf/util/event/EventProcessor.java AL src/main/java/org/apache/bsf/util/event/generator/AdapterClassLoader.java AL src/main/java/org/apache/bsf/util/event/generator/Bytecode.java AL src/main/java/org/apache/bsf/util/event/generator/ByteUtility.java AL src/main/java/org/apache/bsf/util/event/generator/EventAdapterGenerator.java AL src/main/java/org/apache/bsf/util/IndentWriter.java AL src/main/java/org/apache/bsf/util/IOUtils.java AL src/main/java/org/apache/bsf/util/JavaUtils.java AL src/main/java/org/apache/bsf/util/JNIUtils.c AL src/main/java/org/apache/bsf/util/JNIUtils.h AL src/main/java/org/apache/bsf/util/MethodUtils.java AL src/main/java/org/apache/bsf/util/ObjectRegistry.java AL src/main/java/org/apache/bsf/util/ObjInfo.java AL src/main/java/org/apache/bsf/util/ReflectionUtils.java AL src/main/java/org/apache/bsf/util/ScriptSymbolTable.java AL src/main/java/org/apache/bsf/util/StringUtils.java AL src/main/java/org/apache/bsf/util/type/TypeConvertor.java AL src/main/java/org/apache/bsf/util/type/TypeConvertorRegistry.java B src/site/resources/images/bsf_logo.jpg B src/site/resources/images/jakarta-logo.gif AL src/site/site.xml AL src/site/xdoc/bsfnews.xml AL src/site/xdoc/download_bsf.xml AL src/site/xdoc/faq.xml AL src/site/xdoc/index.xml AL src/site/xdoc/mail-lists.xml AL src/site/xdoc/manual.xml AL src/site/xdoc/problems.xml AL src/site/xdoc/projects.xml AL src/site/xdoc/resources.xml AL src/site/xdoc/stylesheets/faq.vsl AL src/site/xdoc/stylesheets/project.xml AL src/site/xdoc/stylesheets/site.vsl AL src/site/xdoc/stylesheets/templates.vm !????? src/site/xdoc/velocity.properties AL src/test/java/org/apache/bsf/BSFEngineTestTmpl.java AL src/test/java/org/apache/bsf/BSFTest.java AL src/test/java/org/apache/bsf/engines/JaclTest.java !????? src/test/java/org/apache/bsf/engines/JavascriptTest.java !????? src/test/java/org/apache/bsf/engines/JythonTest.java !????? src/test/java/org/apache/bsf/engines/NetrexxTest.java AL src/test/java/org/apache/bsf/FakeEngine.java AL src/test/java/org/apache/bsf/util/EngineUtilsTest.java !????? src/test/java/org/apache/bsf/util/IOUtilsTest.java !????? src/test/java/org/apache/bsf/util/StringUtilsTest.java !????? src/test/java/org/apache/bsf/util/TestBean.java !????? taglib/build.bat !????? taglib/build.sh !????? taglib/build.xml !????? taglib/conf/taglib.tld !????? taglib/examples/conf/web.xml !????? taglib/examples/web/temps.jsp !????? taglib/src/doc/stylesheets/taglibs.xsl !????? taglib/src/org/apache/taglibs/bsf/bsftag.java !????? taglib/src/org/apache/taglibs/bsf/expression.java !????? taglib/src/org/apache/taglibs/bsf/scriptlet.java !????? taglib/xml/intro.xml !????? TODO.txt !????? velocity.log !????? velocity.log.1 ***************************************************** Printing headers for files without AL header... ======================================================================= ==CHANGES.txt ======================================================================= changes for Apache BSF 2.4.0 (from RELEASE-NOTE.txt) *) can be used as an extension package to Java by placing it into "jre/lib/ext" [using the thread's context classloader, ie. the result of 'Thread.currentThread().getContextClassLoader()'] *) removed experimental 'DebugLog' class, superceded by commons-logging and log4j *) removed 'org.apache.bsf.engines.activescript.*', as it is not supported anymore (stems from the original IBM codebase, but would need native Windows code to bridge OLE/ActiveX) *) removed 'org.apache.bsf.engines.jpython', as it is superceded by the newer 'org.apache.bsf.engines.jython' *) 'org.apache.bsf.BSFMain.java': new method "public String getVersion()", returns string in the form of a dewey decimal number 'abc' (three levels, each between 0 and 9) 'abc.yyyymmdd', 'yyyy' four digit year, 'mm' two digit month, 'dd' two digit day; e.g. '240.20060925' stands for: BSF version 2.4.0 as of 2006-09-25 *) new class 'org.apache.bsf.utils.BSFEventProcessorReturningEventInfos' *) 'org.apache.bsf.utils.EngineUtils.java': added the method 'addEventListenerReturningEventInfos(...)' changes for Apache BSF 2.3.0 *) Revert BSF debug support (due to several usability issues) and refactor source. *) add javadocs and realclean targets to build.xml scrub remaining email addresses from source for spam prevention add AUTHORS, BUILDING, INSTALL, README, and TODO files *) Cleaned out META* junk *) Removed bsf/src/org/apache/bsf/engines/activescript/samples/* because of copyright issues *) Changes for org.apache.* namespace, license changes changes to BSF 2.2 *) Fix taglibs, and allow debugging through taglibs *) Entry/Exit debugging added *) Overall logging solution, involving a loglevel property ======================================================================= ==samples/bsh/calculator.jacl ======================================================================= # A silly little calculator implemented in Jacl using # Java components for the UI. package require java set f [java::new java.awt.Frame "BSH Calculator (jacl/tcl)"] bsf addEventListener $f "window" "windowClosing" "exit" set p [java::new java.awt.Panel] set f1 [java::new java.awt.TextField] $f1 setColumns 20 bsf addEventListener $f1 "action" "" "doMath" set f2 [java::new java.awt.TextField] bsf addEventListener $f2 "text" "" "doMath" set p [java::new java.awt.Panel] $p setLayout [java::new java.awt.GridLayout 2 2] $p add [java::new java.awt.Label "Enter Operand"] $p add $f1 $p add [java::new java.awt.Label "Enter Operand"] $p add $f2 $f add "North" $p $f add "Center" [java::new java.awt.Label "Results:"] set p [java::new java.awt.Panel] $p setLayout [java::new java.awt.GridLayout 4 2] $p add [java::new java.awt.Label "Sum"] $p add [set sum [java::new java.awt.TextField]] $sum setColumns 20 $p add [java::new java.awt.Label "Difference"] $p add [set diff [java::new java.awt.TextField]] $p add [java::new java.awt.Label "Product"] $p add [set prod [java::new java.awt.TextField]] $p add [java::new java.awt.Label "Quotient"] $p add [set quo [java::new java.awt.TextField]] $f add "South" $p $f pack $f show $f toFront proc getField {f} { set t [$f getText] if {$t == ""} { return 0 } else { return [java::call java.lang.Integer parseInt $t] } ======================================================================= ==samples/bsh/calculator.js ======================================================================= /* A silly little calculator implemented in Javascript (Rhino) using Java components for the UI. */ f = new java.awt.Frame ("BSH Calculator (js)"); bsf.addEventListener (f, "window", "windowClosing", "java.lang.System.exit (0);"); f1 = new java.awt.TextField (20); bsf.addEventListener (f1, "action", null, "doMath ()"); f2 = new java.awt.TextField (20); bsf.addEventListener (f2, "text", null, "doMath ()"); p = new java.awt.Panel (); p.setLayout (new java.awt.GridLayout (2, 2)); p.add (new java.awt.Label ("Enter Operand")); p.add (f1); p.add (new java.awt.Label ("Enter Operand")); p.add (f2); f.add ("North", p); f.add ("Center", new java.awt.Label ("Results:")); p = new java.awt.Panel (); p.setLayout (new java.awt.GridLayout (4, 2)); p.add (new java.awt.Label ("Sum")); p.add (sum = new java.awt.TextField (20)) p.add (new java.awt.Label ("Difference")); p.add (diff = new java.awt.TextField (20)); p.add (new java.awt.Label ("Product")); p.add (prod = new java.awt.TextField (20)); p.add (new java.awt.Label ("Quotient")); p.add (quo = new java.awt.TextField (20)); f.add ("South", p); f.pack (); f.show (); f.toFront (); function getField (f) { t = f.getText (); return (t == "") ? 0 : java.lang.Integer.parseInt (t); } function doMath () { n1 = getField (f1); n2 = getField (f2); sum.setText ((n1 + n2) + ""); diff.setText ((n1 - n2) + ""); prod.setText ((n1 * n2) + ""); ======================================================================= ==samples/bsh/calculator.py ======================================================================= """\ A silly little calculator implemented in JPython using Java components for the UI. """ import java from java import awt def exit(e): java.lang.System.exit(0) def getField (f): t = f.getText () if t == '': return 0 else: return java.lang.Integer.parseInt (t) def doMath (e): n1 = getField (f1) n2 = getField (f2) sum.setText (repr (n1 + n2)) diff.setText (repr (n1 - n2)) prod.setText (repr (n1 * n2)) quo.setText (repr (n1 / n2)) f = awt.Frame ('BSH Calculator (jpython)', windowClosing=exit) f1 = awt.TextField (20, actionPerformed=doMath) f2 = awt.TextField (20, textValueChanged=doMath) p = awt.Panel () p.setLayout (awt.GridLayout (2, 2)) p.add (awt.Label ('Enter Operand')) p.add (f1) p.add (awt.Label ('Enter Operand')) p.add (f2) f.add ('North', p) f.add ("Center", awt.Label ('Results:')) p = awt.Panel () p.setLayout (awt.GridLayout (4, 2)) p.add (awt.Label ('Sum')) sum = awt.TextField (20) p.add (sum) p.add (awt.Label ('Difference')) diff = awt.TextField (20) p.add (diff) p.add (awt.Label ('Product')) ======================================================================= ==samples/bsh/download.js ======================================================================= /* This is a simple demo of a JavaScript script that uses the Java URL class to download some content from some URL. */ URL_ADDR = "http://www.cnn.com/"; /* use a Java bean to get at the URL */ java.lang.System.err.println ("Connecting to .. " + URL_ADDR); url = new java.net.URL (URL_ADDR); /* read the content */ java.lang.System.err.println ("Downloading .. "); content = url.getContent (); while ((ch = content.read ()) != -1) { java.lang.System.out.write (ch) } ======================================================================= ==samples/calc/TestCalc.java ======================================================================= import java.io.*; import java.awt.*; import java.awt.event.*; import java.util.*; import org.apache.bsf.*; import org.apache.bsf.util.*; public class TestCalc extends Frame { public TestCalc (String fileName) throws Exception { BSFManager manager = new BSFManager (); manager.declareBean("frame", this, this.getClass()); try { manager.exec(manager.getLangFromFilename(fileName), fileName, 0, 0, IOUtils.getStringFromReader(new FileReader(fileName))); }catch(BSFException e ) { System.out.println("exception: " + e.getMessage()); Throwable oe= e.getTargetException(); if(null != oe) System.out.println("\nOriginal Exception:"+ oe.getMessage()); e.printStackTrace(); } } public static void main (String[] args) throws Exception { if (args.length != 1) { System.err.println("Missing file name"); System.exit(1); } Frame f = new TestCalc(args[0]); // f.show(); // javac 1.5 warns to use f.show(), Apache build scripts abort as a result :( f.setVisible(true); // available since Java 1.1 f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } } ); } } ======================================================================= ==samples/scriptedui/ScriptedUI.java ======================================================================= /* This example shows how a Java app can allow a script to customize a UI */ import java.awt.*; import java.awt.event.*; import java.io.*; import org.apache.bsf.*; import org.apache.bsf.util.*; public class ScriptedUI { BSFManager mgr = new BSFManager (); public ScriptedUI (String fileName) { Frame f = new Frame ("Application's Main Frame"); f.addWindowListener (new WindowAdapter () { public void windowClosing (WindowEvent e) { System.exit (0); } }); Panel p = new Panel (); f.add ("Center", p); f.add ("North", new Button ("North Button")); f.add ("South", new Button ("South Button")); mgr.registerBean ("centerPanel", p); mgr.registerBean ("parentFrame", f); // --rgf, 2006-08-08: to allow Jacl to get to frame ... // exec script engine code to do its thing for this try { String language = BSFManager.getLangFromFilename (fileName); FileReader in = new FileReader (fileName); String script = IOUtils.getStringFromReader (in); mgr.exec (language, fileName, -1, -1, script); } catch (BSFException e) { System.err.println ("Ouch: " + e.getMessage ()); e.printStackTrace (); } catch (IOException e) { System.err.println ("Ouch: " + e.getMessage ()); e.printStackTrace (); } // now pack and show the frame f.pack (); // f.show(); // javac 1.5 warns to use f.show(), Apache build scripts abort as a result :( f.setVisible(true); // available since Java 1.1 } ======================================================================= ==samples/scriptedui/ui.jacl ======================================================================= # A silly little calculator implemented in Jacl using # Java components for the UI. # Rony G. Flatscher, 2006-08-08 package require java set p [bsf lookupBean "centerPanel"] $p setLayout [java::new java.awt.BorderLayout] $p add "Center" [java::new java.awt.Label "Middle from Jacl"] $p add "North" [java::new java.awt.TextField "north text from Jacl"] $p add "South" [java::new java.awt.TextField "south text from Jacl"] $p add "East" [java::new java.awt.Button "inner east from Jacl"] $p add "West" [java::new java.awt.Button "inner west from Jacl"] $p setBackground [java::field java.awt.Color pink] set f [$p getParent] # needed, because the getParent() returns a "java.awt.Container" not "java.awt.Frame" # in the Jacl engine! The following does not hint at the Java class (other than # java.lang.Object) such that the Jacl engine *seems* to start reflection at the # class from which the object got created from set f [bsf lookupBean "parentFrame"] $f setTitle "Hello from Jacl (title reset from Jacl)" ======================================================================= ==samples/scriptedui/ui.js ======================================================================= /* pick up the center panel bean */ p = bsf.lookupBean ("centerPanel"); /* set the layout manager to border */ p.setLayout (new java.awt.BorderLayout ()); /* add a few things */ p.add ("Center", new java.awt.Label ("Middle from JavaScript")); p.add ("North", new java.awt.TextField ("north text from JavaScript")); p.add ("South", new java.awt.TextField ("south text from JavaScript")); p.add ("East", new java.awt.Button ("inner east from JavaScript")); p.add ("West", new java.awt.Button ("inner west from JavaScript")); /* configure p a bit */ p.setBackground (java.awt.Color.red); /* configure the frame that p is in */ f = p.getParent (); f.setTitle ("Hello from JavaScript (title reset from JavaScript)"); ======================================================================= ==samples/scriptedui/ui.nrx ======================================================================= /* pick up the center panel bean */ p = java.awt.Panel bsf.lookupBean("centerPanel"); /* set the layout manager to border */ p.setLayout(java.awt.BorderLayout()); /* add a few things */ p.add("Center", java.awt.Label("Middle from NetRexx")); p.add("North", java.awt.TextField("north text from NetRexx")); p.add("South", java.awt.TextField("south text from NetRexx")); p.add("East", java.awt.Button("inner east from NetRexx")); p.add("West", java.awt.Button("inner west from NetRexx")); /* configure p a bit */ p.setBackground(java.awt.Color(255, 0, 0)); /* configure the frame that p is in */ f = java.awt.Frame p.getParent(); f.setTitle("Hello from NetRexx (title reset from NetRexx)"); ======================================================================= ==samples/scriptedui/ui.py ======================================================================= """\ A silly little calculator implemented in JPython using Java components for the UI. Rony G. Flatscher, 2006-08-08 """ import java from java import awt p = bsf.lookupBean('centerPanel') p.setLayout ( awt.BorderLayout () ) p.add ("Center", java.awt.Label ("Middle from Jython")) p.add ("North", java.awt.TextField ("north text from Jython")) p.add ("South", java.awt.TextField ("south text from Jython")) p.add ("East", java.awt.Button ("inner east from Jython")) p.add ("West", java.awt.Button ("inner west from Jython")) p.setBackground (java.awt.Color.orange) f = p.getParent () f.setTitle ("Hello from Jython (title reset from Jython)") ======================================================================= ==samples/xsl/style1.xsl ======================================================================= <?xml version='1.0'?> <!-- This stylesheet fills in the data by sorting on the first name. --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" version="1.0"> <!-- get access to the panel --> <xsl:param name="panel"/> <xsl:template match="data"> <xsl:apply-templates select="person"> <xsl:sort select="@first"/> </xsl:apply-templates> </xsl:template> <xsl:template match="person"> <xsl:variable name="junk1" select="java:add ($panel, java:java.awt.Label.new (string(@first)))"/> <xsl:variable name="junk2" select="java:add ($panel, java:java.awt.Label.new (string(@last)))"/> </xsl:template> </xsl:stylesheet> ======================================================================= ==samples/xsl/style2.xsl ======================================================================= <?xml version='1.0'?> <!-- This stylesheet fills in the data without sorting the list of names. --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" version="1.0"> <!-- get access to the panel --> <xsl:param name="panel"/> <xsl:template match="data"> <xsl:apply-templates select="person"/> </xsl:template> <xsl:template match="person"> <xsl:variable name="junk1" select="java:add ($panel, java:java.awt.Label.new (string(@first)))"/> <xsl:variable name="junk2" select="java:add ($panel, java:java.awt.Label.new (string(@last)))"/> </xsl:template> </xsl:stylesheet> ======================================================================= ==samples/xsl/table-data.xml ======================================================================= <?xml version="1.0"?> <data> <person first="Sanjiva" last="Weerawarana"/> <person first="Matt" last="Duftler"/> <person first="Paco" last="Curbera"/> <person first="Sam" last="Ruby"/> <person first="Stephen" last="Boies"/> </data> ======================================================================= ==samples/xsl/TableFiller.java ======================================================================= /** * This is an example of using an XSL script to fill in a Java * table with data obtained from an XML file. */ import java.io.*; import java.awt.*; import java.awt.event.*; import org.apache.bsf.*; import org.apache.bsf.util.IOUtils; public class TableFiller { public static void main (String[] args) throws Exception { if (args.length != 2) { System.err.println ("Usage: java TableFiller xslfilename xmlfilename"); System.exit (0); } String xslfilename = args[0]; String xmlfilename = args[1]; Frame frame = new Frame ("Table Filler"); frame.addWindowListener (new WindowAdapter () { public void windowClosing (WindowEvent e) { System.exit (0); } }); Panel panel = new Panel (new GridLayout (-1, 2)); Font f = new Font ("SansSerif", Font.BOLD, 14); Label l = new Label ("First"); l.setFont (f); panel.add (l); l = new Label ("Last"); l.setFont (f); panel.add (l); frame.add ("Center", panel); BSFManager mgr = new BSFManager (); // make the panel available for playing in XSL mgr.declareBean ("panel", panel, panel.getClass ()); // tell lotusxsl what the input xml file is mgr.registerBean ("xslt:src", new FileReader (xmlfilename)); // load and run the xsl file to fill in the table. Note that we're // running the xsl script for its side effect of filling in the table // and so we don't care what the resulting document is. mgr.exec ("xslt", xslfilename, 0, 0, IOUtils.getStringFromReader (new FileReader (xslfilename))); ======================================================================= ==samples/xsl/TableFiller.jrexx ======================================================================= /* author: Rony G. Flatscher name: TableFiller.rex date: 2006-11-26 purpose: demonstrate how to use the xsl-BSF-engine from ooRexx, modelled after "TableFiller.java" needs: Java 4.x *or* Note on using Java 1.5, Java 1.6 or higher: - if the sample does not work in these environments then, copy the Xalan-jars from "http://xml.apache.org/xalan-j/downloads.html" distribution into the "endorsed" directory of these Java versions (e.g. "JAVA_JRE_HOME /jre/lib/endorsed/"); make sure that the archive "xalan.jar" (from the xalan-tool jar) is available as well; tested with Xalan 2.7 and 2.8 on Java 1.5 and beta-version of Java 1.6 usage: rexxj TableFiller.rex style1.xsl table-data.xml rexxj TableFiller.rex style2.xsl table-data.xml */ parse arg xslFileName xmlFileName if xmlFileName="" then do say "Usage: rexxj TableFiller.rex xslfilename xmlfilename" exit -1 end frame=.bsf~new("java.awt.Frame", "Table Filler (ooRexx)") frame~bsf.addEventListener('window', 'windowClosing', 'call bsf "exit"') panel=.bsf~new("java.awt.Panel", .bsf~new("java.awt.GridLayout", -1, 2)) -- import the Java Font class, store it in .local as "jfont" call bsf.import "java.awt.Font", "jfont" f=.jfont~new("SansSerif", .jfont~bold , 14) do text over .list~of("First", "Last") l=.bsf~new("java.awt.Label", text) ~~setFont(f) panel~add(l) end frame~add("Center", panel) mgr=.bsf~new("org.apache.bsf.BSFManager") -- create a new BSFManager instance mgr~declareBean("panel", panel, panel~getClass) mgr~registerBean("xslt:src", .bsf~new("java.io.FileReader", xmlFileName)) -- xslString=bsf.import("org.apache.bsf.util.IOUtils")~getStringFromReader(.bsf~new("java.io.Filereader", xslFileName)) xslString=charin(xslFileName, 1, chars(xslFileName)) -- read content of file mgr~exec("xslt", xslFileName, 0, 0, xslString) ======================================================================= ==src/log4j.properties ======================================================================= log4j.rootLogger=FATAL, CONSOLE log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.layout=org.apache.log4j.SimpleLayout ======================================================================= ==src/site/xdoc/velocity.properties ======================================================================= file.resource.loader.path=src/site/xdoc/stylesheets velocimacro.library=templates.vm ======================================================================= ==src/test/java/org/apache/bsf/engines/JavascriptTest.java ======================================================================= /* * The Apache Software License, Version 1.1 * * Copyright (c) 2004 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Apache BSF", "Apache", and "Apache Software Foundation" * must not be used to endorse or promote products derived from * this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by ======================================================================= ==src/test/java/org/apache/bsf/engines/JythonTest.java ======================================================================= /* * The Apache Software License, Version 1.1 * * Copyright (c) 2004 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Apache BSF", "Apache", and "Apache Software Foundation" * must not be used to endorse or promote products derived from * this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by ======================================================================= ==src/test/java/org/apache/bsf/engines/NetrexxTest.java ======================================================================= /* * The Apache Software License, Version 1.1 * * Copyright (c) 2004 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Apache BSF", "Apache", and "Apache Software Foundation" * must not be used to endorse or promote products derived from * this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by ======================================================================= ==src/test/java/org/apache/bsf/util/IOUtilsTest.java ======================================================================= /* * The Apache Software License, Version 1.1 * * Copyright (c) 2004 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Apache BSF", "Apache", and "Apache Software Foundation" * must not be used to endorse or promote products derived from * this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by ======================================================================= ==src/test/java/org/apache/bsf/util/StringUtilsTest.java ======================================================================= /* * The Apache Software License, Version 1.1 * * Copyright (c) 2004 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Apache BSF", "Apache", and "Apache Software Foundation" * must not be used to endorse or promote products derived from * this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by ======================================================================= ==src/test/java/org/apache/bsf/util/TestBean.java ======================================================================= /* * The Apache Software License, Version 1.1 * * Copyright (c) 2004 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Apache BSF", "Apache", and "Apache Software Foundation" * must not be used to endorse or promote products derived from * this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by ======================================================================= ==taglib/build.bat ======================================================================= @echo off if "%SERVLET_JAR%" == "" goto noservletjar set _ANTHOME=%ANT_HOME% if "%ANT_HOME%" == "" set ANT_HOME=..\..\jakarta-ant if "%CLASSPATH%" == "" goto noclasspath set _CLASSPATH=%CLASSPATH% set CLASSPATH=%CLASSPATH%;%ANT_HOME%\lib\ant.jar;%ANT_HOME%\lib\xml.jar;%JAVA_HOME%\lib\tools.jar goto next :noclasspath set _CLASSPATH= set CLASSPATH=%ANT_HOME%\lib\ant.jar;%ANT_HOME%\lib\xml.jar;%JAVA_HOME%\lib\tools.jar goto next :next java org.apache.tools.ant.Main -Dant.home=%ANT_HOME% -Dservlet.jar=%SERVLET_JAR% %1 %2 %3 %4 %5 %6 %7 %8 %9 :clean set CLASSPATH=%_CLASSPATH% set _CLASSPATH= set ANT_HOME=%_ANTHOME% set _ANTHOME= set ARGS=%_ARGS% set _ARGS= goto done :noservletjar echo You must set SERVLET_JAR to that pathname of your servlet.jar file :done ======================================================================= ==taglib/build.sh ======================================================================= #! /bin/sh if [ "$ANT_HOME" = "" ] ; then ANT_HOME=../../jakarta-ant fi args="" if [ "$SERVLET_JAR" != "" ] ; then args="$args -Dservlet.jar=$SERVLET_JAR" fi args="$args -Dant.home=$ANT_HOME" cp=$ANT_HOME/lib/ant.jar:$ANT_HOME/lib/xml.jar:$JAVA_HOME/lib/tools.jar java -classpath $cp:$CLASSPATH org.apache.tools.ant.Main $args "$@" ======================================================================= ==taglib/build.xml ======================================================================= <!-- ANT Build Script for the "bsf" Custom Tag Library --> <project name="bsf" default="main" basedir="."> <!-- ******************** Adjustable Properties *********************** --> <!-- The following property values should be examined and customized for each custom tag library subproject. ant.home Home directory for the ANT build tool This is normally defaulted from the ANT_HOME environment variable in the build script. servlet.jar Pathname of the servlet API classes you are using to compile, such as the one that comes with Tomcat. This is normally defaulted from the SERVLET_JAR environment variable in the build script. taglib.name Base name of this tag library subproject. --> <property name="taglib.name" value="bsf"/> <property name="ant.home" value="../../jakarta-ant"/> <property name="servlet.jar" value="../../jakarta-servletapi/lib/servlet.jar"/> <!-- ****************** Project Standard Properties ******************* --> <!-- The following property values reflect the standard directory organization for the jakarta-taglibs project, and should not be changed or overridden. build.dir Base directory for build targets dist.dir Base directory for distribution targets taglibs.xsl Taglibs stylesheet --> <property name="build.dir" value="../build"/> <property name="dist.dir" value="../dist"/> <property name="taglibs.xsl" value="src/doc/stylesheets/taglibs.xsl"/> <!-- *********************** Default Properties ********************** --> ======================================================================= ==taglib/conf/taglib.tld ======================================================================= <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglib_1_1.dtd"> <!-- a tab library descriptor --> <taglib> <!-- after this the default space is "http://java.sun.com/j2ee/dtds/jsptaglibrary_1_2.dtd" --> <tlibversion>2.0</tlibversion> <jspversion>1.2</jspversion> <shortname>BSF JSP Support</shortname> <uri>http://jakarta.apache.org/taglibs/</uri> <info> Just testing </info> <tag> <name>scriptlet</name> <tagclass>org.apache.taglibs.bsf.scriptlet</tagclass> <bodycontent>tagdependent</bodycontent> <info>Run script</info> <attribute> <name>language</name> <required>true</required> </attribute> </tag> <tag> <name>expression</name> <tagclass>org.apache.taglibs.bsf.expression</tagclass> <bodycontent>tagdependent</bodycontent> <info>Run expression</info> <attribute> <name>language</name> <required>true</required> </attribute> </tag> </taglib> ======================================================================= ==taglib/examples/conf/web.xml ======================================================================= <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> <web-app> <description> Example web application illustrating the use of tags in the "bsf" custom tag library, from the JAKARTA-TAGLIBS project. </description> <taglib> <taglib-uri>http://jakarta.apache.org/taglibs/bsf-2.0</taglib-uri> <taglib-location>/WEB-INF/bsf.tld</taglib-location> </taglib> </web-app> ======================================================================= ==taglib/examples/web/temps.jsp ======================================================================= <html> <%@ taglib uri="http://jakarta.apache.org/taglibs/bsf-2.0" prefix="bsf" %> <head> <title>Temperature Table</title> </head> <body> <h1>Temperature Table</h1> <p>American tourists visiting Canada can use this handy temperature table which converts from Fahrenheit to Celsius: <br><br> In TCL <table BORDER COLS=2 WIDTH="20%" > <tr BGCOLOR="#FFFF00"> <th>Fahrenheit</th> <th>Celsius</th> </tr> <bsf:scriptlet language="tcl"> package require java for {set i 60} {$i<=100} {incr i 10} { $out println "<tr ALIGN=RIGHT BGCOLOR=\"#CCCCCC\">" $out println "<td>$i</td>" $out println [concat "<td>" [format %4.2f [expr ($i - 32.0)*5/9]] "</td>"] $out println "</tr>" } </bsf:scriptlet> </table> <bsf:expression language="tcl"> package require java ; java::new java.util.Date </bsf:expression> <hr>In Javascript <table BORDER COLS=2 WIDTH="20%" > <tr BGCOLOR="#FFFF00"> <th>Fahrenheit</th> <th>Celsius</th> </tr> <bsf:scriptlet language="javascript"> for (i=60; i<=100; i+=10) { out.println ("<tr ALIGN=RIGHT BGCOLOR=\"#CCCCCC\">") out.println ("<td>" + i + "</td>") out.println ("<td>" + Math.round((i - 32)*5/9) + "</td>") out.println ("</tr>") } </bsf:scriptlet> </table> <bsf:expression language="javascript"> new java.util.Date() </bsf:expression> ======================================================================= ==taglib/src/doc/stylesheets/taglibs.xsl ======================================================================= <?xml version="1.0" encoding="ISO-8859-1"?> <!-- Content Stylesheet for Taglibs Documentation --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- Output method --> <xsl:output method="html" indent="no"/> <!-- Defined variables --> <xsl:variable name="body-bg" select="'#ffffff'"/> <xsl:variable name="body-fg" select="'#000000'"/> <xsl:variable name="body-link" select="'#023264'"/> <xsl:variable name="banner-bg" select="'#023264'"/> <xsl:variable name="banner-fg" select="'#ffffff'"/> <xsl:variable name="docDir">http://jakarta.apache.org/taglibs/doc</xsl:variable> <xsl:param name="prefix"></xsl:param> <!-- Process an entire document into an HTML page --> <xsl:template match="document"> <xsl:variable name="project" select="document('../project.xml')/project"/> <html> <head> <meta name="author" content="{properties/author/.}"/> <!-- <link rel="stylesheet" type="text/css" href="default.css"/> --> <xsl:choose> <xsl:when test="properties/title"> <title><xsl:value-of select="properties/title"/></title> </xsl:when> <xsl:when test="body/title"> <title><xsl:value-of select="body/title"/></title> </xsl:when> <xsl:otherwise> <title>Jakarta-Taglibs Project</title> </xsl:otherwise> </xsl:choose> </head> <body bgcolor="{$body-bg}" text="{$body-fg}" link="{$body-link}" alink="{$body-link}" vlink="{$body-link}"> <table border="0" width="100%" cellspacing="5"> <tr><td colspan="2"> <a href="http://jakarta.apache.org"> <img src="{$prefix}images/jakarta-logo.gif" align="left" border="0"/> </a> <a href="http://jakarta.apache.org/taglibs/index.html"> ======================================================================= ==taglib/src/org/apache/taglibs/bsf/bsftag.java ======================================================================= /* * The Apache Software License, Version 1.1 * * Copyright (c) 2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Apache BSF", "Apache", and "Apache Software Foundation" * must not be used to endorse or promote products derived from * this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation. For more information on the ======================================================================= ==taglib/src/org/apache/taglibs/bsf/expression.java ======================================================================= /* * The Apache Software License, Version 1.1 * * Copyright (c) 2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Apache BSF", "Apache", and "Apache Software Foundation" * must not be used to endorse or promote products derived from * this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation. For more information on the ======================================================================= ==taglib/src/org/apache/taglibs/bsf/scriptlet.java ======================================================================= /* * The Apache Software License, Version 1.1 * * Copyright (c) 2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Apache BSF", "Apache", and "Apache Software Foundation" * must not be used to endorse or promote products derived from * this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation. For more information on the ======================================================================= ==taglib/xml/intro.xml ======================================================================= <?xml version="1.0"?> <document url="./intro.xml"> <properties> <author>Justyna Horwat</author> <title>The Jakarta-Taglibs Project: BSF Tag Library</title> </properties> <body> <section name="BSF Tag Library" href="Welcome"> <p>The Bean Scripting Framework (BSF) is an architecture for incorporating scripting into Java applications and applets. Scripting languages such as Netscape Rhino (Javascript), VBScript, Perl, Tcl, Python, NetRexx and Rexx are commonly used to augment an application's function or to script together a set of application components to form an application.</p> </section> <section name="Documentation" href="Documentation"> <p>For more information about the BSF Tag Library, look at the on-line documentation:</p> <ul> <li>View the <a href="index.html">BSF Taglib Documentation</a></li> </ul> <p>For information on how to use the distributions, look at the following documentation:</p> <ul> <li>Using the Jakarta-Taglibs <a href="http://jakarta.apache.org/taglibs/binarydist.html">Binary Distribution</a></li> <li>Using the Jakarta-Taglibs <a href="http://jakarta.apache.org/taglibs/sourcedist.html">Source Distribution</a></li> </ul> </section> <section name="Download" href="Download"> <p>A binary download of the BSF Tag Library is available</p> <ul> <li>Download <a href="http://jakarta.apache.org/builds/jakarta-taglibs/nightly/projects/bsf/">BSF Tag Library</a></li> </ul> <p>The following distributions are also available for download:</p> <ul> <li>Download <a href="http://jakarta.apache.org/builds/jakarta-taglibs/nightly/src/">Jakarta-Taglibs Source</a></li> <li>Download entire <a href="http://jakarta.apache.org/builds/jakarta-taglibs/nightly">Jakarta-Taglibs Distribution</a></li> </ul> ======================================================================= ==TODO.txt ======================================================================= For 2011-08-17 (a test whether commiting has become possible as well): - incorporate all RFEs for BSF 2.4 - possibly create a JSR-223-adapter for BSF 2.4 (there are engines for BSF 2.4 for which no JSR-223 engines exist; in addition it may buy time for deployments that have a mix of BSF 2.4 and JSR-223) -------------------------- cut here (from 2006) ------------------------------ For 2006-09-25 the TODO list would consist at least from the following items: - add new BSF engines for BSF 2.4 - create a new BSF 3.0 which complies to JSR-223 (which is part of Java 1.6), some features being - BSF 3.0 will be available as FOSS for earlier version of Java - BSF 3.0 may get an internal adapter for employing the numerous BSF 2.4 engines transparently - ... Rony G. Flatscher, 2006-09-25 ------------------------------ cut here (from 2003) ----------------------------- The following TODO list stems from 2003 and has not been updated anymore and has partially been obsoleted: TODO list for BSF 2.3.0-1: use a discovery mechanism like JAXP in place of Languages.properties break out messages for both runtime and debugging into properties files work out a better procedure for obtaining language jarfiles Maven/Ibiblio and replacement of CVS with Subversion are possibilities improve doc generation and distribution provide/incorporate patches for Jasper 4.0.x, 4.1.x, and 5.x. TODO list for BSF 2.4.0: work on improving BSF global scope, e.g.: public Boolean variableExists() public Object getVariableValue() public void setVariableValue() ======================================================================= ==velocity.log ======================================================================= 2011-10-17 15:31:38,063 - Velocimacro : VM addition rejected : section : inline not allowed to replace existing VM 2011-10-17 15:31:38,063 - Velocimacro : VM addition rejected : document : inline not allowed to replace existing VM 2011-10-17 15:31:38,063 - ResourceManager : found ./site.vsl with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader 2011-10-17 15:31:38,110 - Velocimacro : VM addition rejected : subsection : inline not allowed to replace existing VM 2011-10-17 15:31:38,110 - Velocimacro : VM addition rejected : section : inline not allowed to replace existing VM 2011-10-17 15:31:38,110 - Velocimacro : VM addition rejected : document : inline not allowed to replace existing VM 2011-10-17 15:31:38,110 - ResourceManager : found ./site.vsl with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader ======================================================================= ==velocity.log.1 ======================================================================= 2011-09-11 13:22:46,484 - Velocimacro : VM addition rejected : document : inline not allowed to replace existing VM 2011-09-11 13:22:46,500 - ResourceManager : found ./site.vsl with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader 2011-09-11 13:22:46,546 - Velocimacro : VM addition rejected : subsection : inline not allowed to replace existing VM 2011-09-11 13:22:46,546 - Velocimacro : VM addition rejected : section : inline not allowed to replace existing VM 2011-09-11 13:22:46,546 - Velocimacro : VM addition rejected : document : inline not allowed to replace existing VM 2011-09-11 13:22:46,546 - ResourceManager : found ./site.vsl with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader 2011-09-11 13:22:46,656 - Velocimacro : VM addition rejected : subsection : inline not allowed to replace existing VM 2011-09-11 13:22:46,656 - Velocimacro : VM addition rejected : section : inline not allowed to replace existing VM 2011-09-11 13:22:46,656 - Velocimacro : VM addition rejected : document : inline not allowed to replace existing VM 2011-09-11 13:22:46,656 - ResourceManager : found ./site.vsl with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader 2011-09-11 13:22:46,796 - Velocimacro : VM addition rejected : subsection : inline not allowed to replace existing VM 2011-09-11 13:22:46,796 - Velocimacro : VM addition rejected : section : inline not allowed to replace existing VM 2011-09-11 13:22:46,796 - Velocimacro : VM addition rejected : document : inline not allowed to replace existing VM 2011-09-11 13:22:46,796 - ResourceManager : found ./site.vsl with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader 2011-09-11 13:22:47,046 - SimpleLog4JLogSystem initialized using logfile 'velocity.log' 2011-09-11 13:22:47,046 - ************************************************************** 2011-09-11 13:22:47,046 - Starting Jakarta Velocity v1.4 2011-09-11 13:22:47,046 - RuntimeInstance initializing. 2011-09-11 13:22:47,046 - Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties 2011-09-11 13:22:47,046 - Trying to use logger class org.apache.velocity.runtime.log.AvalonLogSystem 2011-09-11 13:22:47,046 - Couldn't find class org.apache.velocity.runtime.log.AvalonLogSystem or necessary supporting classes in classpath. Exception : java.lang.NoClassDefFoundError: org/apache/log/format/Formatter 2011-09-11 13:22:47,046 - Trying to use logger class org.apache.velocity.runtime.log.SimpleLog4JLogSystem 2011-09-11 13:22:47,046 - Using logger class org.apache.velocity.runtime.log.SimpleLog4JLogSystem 2011-09-11 13:22:47,046 - Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl) 2011-09-11 13:22:47,046 - Resource Loader Instantiated: org.apache.velocity.runtime.resource.loader.FileResourceLoader 2011-09-11 13:22:47,046 - FileResourceLoader : initialization starting. 2011-09-11 13:22:47,046 - FileResourceLoader : adding path 'src/site/xdoc/stylesheets' 2011-09-11 13:22:47,046 - FileResourceLoader : initialization complete. 2011-09-11 13:22:47,046 - ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl) 2011-09-11 13:22:47,046 - Default ResourceManager initialization complete. 2011-09-11 13:22:47,046 - Loaded System Directive: org.apache.velocity.runtime.directive.Literal 2011-09-11 13:22:47,046 - Loaded System Directive: org.apache.velocity.runtime.directive.Macro 2011-09-11 13:22:47,046 - Loaded System Directive: org.apache.velocity.runtime.directive.Parse 2011-09-11 13:22:47,046 - Loaded System Directive: org.apache.velocity.runtime.directive.Include 2011-09-11 13:22:47,046 - Loaded System Directive: org.apache.velocity.runtime.directive.Foreach 2011-09-11 13:22:47,062 - Created: 20 parsers. 2011-09-11 13:22:47,062 - Velocimacro : initialization starting. 2011-09-11 13:22:47,062 - Velocimacro : adding VMs from VM library template : templates.vm 2011-09-11 13:22:47,062 - Velocimacro : added new VM : #table( table ) : source = templates.vm 2011-09-11 13:22:47,062 - Velocimacro : added new VM : #tr( tr ) : source = templates.vm 2011-09-11 13:22:47,062 - Velocimacro : added new VM : #td( value ) : source = templates.vm 2011-09-11 13:22:47,062 - Velocimacro : added new VM : #th( value ) : source = templates.vm 2011-09-11 13:22:47,062 - Velocimacro : added new VM : #projectanchor( name value ) : source = templates.vm 2011-09-11 13:22:47,062 - Velocimacro : added new VM : #metaauthor( author email ) : source = templates.vm 2011-09-11 13:22:47,062 - Velocimacro : added new VM : #image( value ) : source = templates.vm 2011-09-11 13:22:47,062 - Velocimacro : added new VM : #source( value ) : source = templates.vm 2011-09-11 13:22:47,062 - Velocimacro : added new VM : #makeProject( ) : source = templates.vm 2011-09-11 13:22:47,062 - Velocimacro : added new VM : #getProjectImage( ) : source = templates.vm 2011-09-11 13:22:47,062 - Velocimacro : added new VM : #header( ) : source = templates.vm 2011-09-11 13:22:47,062 - Velocimacro : added new VM : #footer( ) : source = templates.vm