refactored ajax\nonajax servlets