template to exec a program, and return its arguments into request
properties .
This template processes the <exec ...>
tag.
The following attributes are supported. ${...} substitutions are
preformed before the command is run.
- command
-
The command to run. The environment (and path) are inherited
from the server. This is a required parameter.
- usesh
- There is a bug in "exec" that prevents passing arguments to a
command with embedded whitespace. If this flag is present, then
the command "/bin/sh -c [command]" is run. This only works on systems
where "/bin/sh" may be executed.
- prepend
- The name prepended to the properties produced by this tag
- stdin
- The standard input to send to the command (if any)
- encoding
- The character set encoding to use when converting the stdout
and stderr properties. If no encoding attribute is present, the
encoding property is used instead. Defaults to the default encoding.
The following request properties are set as a side effect:
- stdout
- The standard output produced by the program, converted to a String
using the default encoding.
- stderr
- The standard error output produced by the program, converted to
a String using the default encoding.
- code
- The exit code for the program.
- error
- The error message, if something went wrong.
Currently, there is no way to set the environment or current
directory for the program.