Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Long before there were "Application Servers", web servers have been running server-side scripts based on client-side input. This is what CGI is all about. Needless to say, when people started developing application servers, they were sure to include in them some way of accessing the CGI capabilities that web developers had become used to.</p> <p>So the answer to your question is that you can almost certainly run a server-side script based on client-side input. The problem with answering your question is that you haven't really told anyone what your server side is. Knowing what operating system your application server is on is also important in giving you a complete answer.</p> <p>Since your question is posted under the Java tag, everyone is assuming that your server side is some J2EE application server. If that is the case, then all the answers so far give good clues to what you need to do. (If you are not running on an application server, then you need to look into the CGI capabilities of your web server (and change your tag to CGI).)</p> <p>Scott's answer tells you the old way to execute your script or any executable. Kalecser's answer tells you the newer "kosher" way to do it. gnlogic and Vinegar sugest your application server might provide built-in API for doing this.</p> <p>gnlogic also brings up the point of synchronization. I can't comment on an unknown application server API, but Runtime.exec and ProcessBuilder both create an asynchronous process. Dealing with an async process is a totaly different question.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload