java - How to Run Shell Scripts on server using Browser -


i having shell script output output.zip.

i want run shell script on server using browser , download output.zip.

please suggest me how can this, technology should use.

not sure server platform assume have java there , can handle http request.

create output file command:

runtime.getruntime().exec("sh test.sh"); 

the second part stream content of file response. set response header

content-description: file transfer  content-type: application/octet-stream content-disposition: attachment; filename="yourfilename.zip" content-transfer-encoding: binary content-length: lengthofyourfileinbytes 

and can send file content body of response.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -