On 18 January 2011 19:48, Konstantin Kolinko <knst.koli...@gmail.com> wrote: > 2011/1/18 sebb <seb...@gmail.com>: >> >> The empty string is assumed to be "perl", according to: >> > > No. Absence of this init-param is what will be "perl". > > Setting it explicitly overwrites the default. > > if (getServletConfig().getInitParameter("executable") != null) { > cgiExecutable = getServletConfig().getInitParameter("executable"); > }
I see, perhaps the docs could make this more obvious? >>> So cmd /q /c will be written as >>> >>> <init-param> >>> <param-name>executable</param-name> >>> <param-value>cmd.exe</param-value> >>> </init-param> >>> <init-param> >>> <param-name>executable-arg-1</param-name> >>> <param-value>/q</param-value> >>> </init-param> >>> <init-param> >>> <param-name>executable-arg-2</param-name> >>> <param-value>/c</param-value> >>> </init-param> >>> >>> What do you think? >> >> Ant has a nicer format: >> >> <exec executable="cmd"> >> <arg value="/c"/> >> <arg value="ant.bat"/> >> <arg value="-p"/> >> </exec> > > That above was a part of web.xml. Maybe you mean "arg-1", "arg-2" etc > (instead of "executable-arg-1")? No, I meant that the Ant format is much easier to use, and could perhaps be added to web.xml. Instead of <init-param> <param-name>executable</param-name> <param-value>cmd.exe</param-value> </init-param> <init-param> <param-name>executable-arg-1</param-name> <param-value>/q</param-value> </init-param> <init-param> <param-name>executable-arg-2</param-name> <param-value>/c</param-value> </init-param> you would allow: <exec executable="cmd.exe"> <arg value="/q"/> <arg value="/c"/> </exec> which is very much simpler Or perhaps extend param to allow multiple values: <init-param> <param-name>executable</param-name> <param-value>cmd.exe</param-value> <param-value>/q</param-value> <param-value>/c</param-value> </init-param> But maybe they would both be too hard to add to the current XML syntax. And both assume that ordering is preserved when parsing multiple tags with the same name. > > Best regards, > Konstantin Kolinko > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org