(Omit source code)
Constants constants = new Constants(); servlet.getServletContext().setAttribute("Constants", constants);