File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

client server programming

 
Shreegowri Bhojanna
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have two shell script in client side, i want to send those two to server and server should run those scripts and it should send back the result back to client... I am new to this topic... Is there any way...


Thanks,
Shreegowri
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could write a servlet that accepts the uploaded files, stores them in the file system, and executes them via Runtime.exec or ProcessBuilder. It could then read the results (either directly from the process output, or from a file created by the scripts), and then forwards to a JSP that display those results. All this assumes that the servlet (or rather, the servlet container) have the proper permissions to do all that.

As a general security precaution, I'd be very hesitant to let users upload and run arbitrary scripts, though. Your system administratir would probably agree to that.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic