Forums Register Login

Executing Batch File from JSP file

+Pie Number of slices to send: Send
Hi All,

Can anybody provide details about - How to run a batch file which resides in a Webserver thro' a JSP file.

1. Have access to the webserver a particular port.
2. So need to use only HTTP protocol.
3. I need to run a batch file that is residing in the web folder of the weserver.
4. I assume I can use only JSP and I can put Java code in JSP file.

Thanks
Sajeendra
+Pie Number of slices to send: Send
 

Originally posted by Sajeendra Prasad:
Hi All,

Can anybody provide details about - How to run a batch file which resides in a Webserver thro' a JSP file.


Runtime.exec() allows you to commands as a separate process.
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html

1. Have access to the webserver a particular port.
You configure the port at the container level. Read your server's documentation.
2. So need to use only HTTP protocol.
Yes, you can call it from a browser.
3. I need to run a batch file that is residing in the web folder of the weserver.
Put it where ever you like. Best if you can make the location a configurable
init param.
4. I assume I can use only JSP and I can put Java code in JSP file.
You could do it from a servlet as well, but yes you can do it from a
Java scriptlet in a JSP page.

Thanks
Sajeendra
[ January 07, 2005: Message edited by: Ben Souther ]
It's just a flesh wound! Or a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1209 times.
Similar Threads
Running batch file from JSP
how to seperate weblogic?
Webserver -HA
Batch File Runner in Windows
JSP
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 12:16:16.