Initialized AJAX, complete PHP script and mocked servlet code