<config charset="charset_value" scriptlang="default_script_lang"> configuration body </config>
Name | Required | Default | Description |
---|---|---|---|
charset | no | UTF-8 | Defines default charset used throughout configuration. Every processor that needs charset information uses this value if other not explicitly set. |
scriptlang | no | beanshell | Defines default scripting engine used throughout configuration. Allowed values are beanshell, javascript and groovy. Default engine is used wherever not other is specified. script and template processors have ability to specify scripting engine within the same Web-Harvest configuration, that way giving possibility to even mix different scripting languages. |
<config charset="ISO-8859-1" scriptlang="groovy"> <file action="write" path="squares.txt"> <script return="${[1, 2, 3, 4, 5].collect(square)}"> <![CDATA[ square = { it * it } ]]> </script> </file> </config>
Here, file processor uses default encoding ISO-8859-1 and script processor uses default language groovy.