in the Sun Java PetStore demo index.jsp file, I'm getting a Null Pointer Exception on cf
CatalogFacade cf = (CatalogFacade)getServletContext().getAttribute("CatalogFacade");
List<Tag> tags=cf.getTagsInChunk(0, 12); <--- cf is Null
I'm using Eclipse and I don't know why CatalogFacade is null or how to debug this.
Any clue greatly appreciated.
Edit:
In the CatalogFacade
Class which implements ServletContextListener
public void contextInitialized(ServletContextEvent sce) {
ServletContext context = sce.getServletContext();
context.setAttribute("CatalogFacade", this);
}