Corrected parameter logic in doGet and doPut.