Refactoring AppServlet.java.
merge conflict
Refactoring AppServlet.java.