Here is a very simple Applet that uses HTTPClient to POST a string to a cgi-script. Click on Doit to send the request. Here is the source code for it. (Note: you'll have to first move the my_script.cgi to the cgi-bin directory on your server).
my_script.cgi