Hi Sammi,
You can use JSP to execute external commands.You can use Java Native Interface to execute native code code stored inside libraries or DLLs but all this i think can be done on the server since JSP pages are executed on the server.
You can execute external commands on the server using the Runtime class.
example:
Runtime r=Runtime.getRuntime();
Process p=r.exec(external command);
bye,
Hrish