I need to pass parameter to remote beanshell script which is run through
java -cp bsh-2.0b4.jar bsh.Remote http://10.0.0.1/beanshell script.bsh p1 p2 p3
call.
Is it somehow possible to read params ‘p1’, ‘p2’ and ‘p3’ from within the script.bsh?
p.s. Local params passing through bsh.args works fine, but it’s unusable with remote scripting.
I suppose, you are using beanshell library. There is no way to do so, according to sources: the utility takes only 2 arguments: the URL and the local script filename. It even does not support several script filenames, as it claim to.
Also the server-side should be aware about the arguments passed.
The ways out for you:
bsh.Remotebsh.Remote.