Refactoring to prepare move MageServlet to servlet container legacy servlets