>     How can i post form data to  a servlet program using ruby .

There should be some useful documentation on ruby-doc.org/core for the
Net::HTTP library for performing a POST request.