Fixed bad variable names causing errors. Now works with java POSTing.