diff --git a/docs/manual/CoreTypes/filterchain.html b/docs/manual/CoreTypes/filterchain.html index 89f26ad4a..332076611 100644 --- a/docs/manual/CoreTypes/filterchain.html +++ b/docs/manual/CoreTypes/filterchain.html @@ -1260,6 +1260,8 @@ an explanation of scripts and dependencies.
The script is provided with an object self that has getToken() and setToken(String) methods. +The getToken() method returns the current token. The setToken(String) +method replaces the current token.
This filter may be used directly within a filterchain.@@ -1286,16 +1288,30 @@ Must be a supported Apache BSF language
<tokenfilter>
<scriptfilter language="javascript">
self.setToken(self.getToken().toUpperCase());
</scriptfilter>
</tokenfilter>
-
+Remove lines containing the string "bad" while
+copying text files:
+
+
+<copy todir="dist">
+ <fileset dir="src" includes="**/*.txt"/>
+ <scriptfilter language="beanshell">
+ if (self.getToken().indexOf("bad") != -1) {
+ self.setToken(null);
+ }
+ </scriptfilter>
+</copy>
+
+
+