Christophe Verré wrote:You have overridden init(ServletConfig) so you should store the servletConfig somewhere, or call the parent's init method.
In your init():
Either ctx = cfg.getServletContext();
Or super.init(cfg);
Overriding the init() method will prevent the default mechanism, so HttpServlet won't store the ServletConfig for you. That's why getServletContext() will cause NullPointerException.
[ January 26, 2006: Message edited by: Satou kurinosuke ]