Hi everyone,
I am unbelievably new to any type of
Java programming - I am mainly doing Linux scripting. I now have a task to associate a
JSP file accessible from browser to scripts in the Linux back end which are performing various tasks and eventually sending an email.
My criteria is:
First input: email address in a text box
Second input: list of files (one file per line) in a text box
JSP code should pass the inputs along to a back end Linux script (input1 = $1, input2 = $2) - the script will then perform it's functions and send an email with the same list of files provided.
From my research thus far, I have found the difference between request.getParameter returning a single value, and request.getParameterValues returning multiple values (which is what I need). My problem seems to be the conversion of
string to array when using the request.getParameterValues. When I execute my JSP, I am getting the error:
[Ljava.lang.String;@10181f5b means that files is an array of type java.lang.String and 10181f5b is hashcode of this variable.
I am looking for a simple method of converting my array back to strings so it can be parsed to the Linux script and subsequently considered by this script in the output email.
OR otherwise pass a multi line variable list to the back end script.
Can anyone suggest?
My code...