Forums Register Login

To invoke a servlet from a unix shell script

+Pie Number of slices to send: Send
Hi,
I need to write a shell script that has to invoke a servlet or send a http request to servlet.
Any tips?
reply to nishar_ahamed@lycos.com
Thanks
Nishar
+Pie Number of slices to send: Send
hi,
you can try to execute lynx <targeturl>.
This then starts a request to the servlet.
olli
+Pie Number of slices to send: Send
Why not write a short program in Java? Look at the documentation for java.net.URL, URLConnection and HttpURLConnection. Of course there are also Perl tools to do this.
Bill
[ July 25, 2003: Message edited by: William Brogden ]
+Pie Number of slices to send: Send
wget or cURL are probably the easiest solutions -- they are designed to do exactly what you describe. If you don't have either of these, and you don't have admin access to install one, you can probably find a statically linked binary to run local.
[ July 25, 2003: Message edited by: Philip Shanks ]
Always! Wait. Never. Shut up. Look at this 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 843 times.
Similar Threads
How to call unix shell script through servlet
Do I have to use JNI to invoke Korn shell or perl script from java ?
handling Java child process execution
Calling servlet from shell script
invoking Korn shell scripts from a servlet
More...

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