I need to test services with POST transactions. Using HTML to do it is the easiest way, constructed in Java (that part isn't necessary unless the args are somehow cooked or just too complex to trust hand-crafted HTML).
// write the HTML code out to stdout -- leave it to the user to redirect
System.out.print( "<html><body><form id='test' name='test' action='" );
System.out.print( url );
System.out.print( "/getStuff' method='POST'><input type='hidden' id='cid' name='cid' value=\"" );
System.out.print( compId );
System.out.print( "\"/><input type='hidden' id='ids' name='ids' value=\"" );
System.out.print( ids );
System.out.print( "\"/>" );
System.out.print( "<input type='submit' name='Submit' value='Submit'></form></body></html>" );
System.out.println();