解决方案 »

  1.   

    这个是Index.jsp第40行的代码 %><%
    List<Category> categories = CategoryService.getInstance().getCategories();
    List<Category> topCategories = getTopCategories(categories); %>
      

  2.   

    CategoryService.getInstance() 没获取的实例对象,报空???
      

  3.   

    果断检查CategoryService.getInstance() ,
    在java代码中System.out.println(CategoryService.getInstance())  输出一下,是否能够获取到对象
      

  4.   

    ava.lang.NullPointerException,这是个大众异常,LZ还是断点调下
      

  5.   

    categories这个集合你看看是不是没有获取到值
      

  6.   

    空指针异常,CategoryService.getInstance().getCategories();这里要不就是你这个CategoryService.getInstance().实例化的时候出错,要不就是getCategories出错