NullPointerException when setting attribute?

后端 未结 5 610
隐瞒了意图╮
隐瞒了意图╮ 2020-12-19 05:17

For example I have a servlet code that sets attribute to a HttpServletRequest:

request.setAttribute(\"someValue\", someValue());
        RequestDispatcher rd         


        
5条回答
  •  旧巷少年郎
    2020-12-19 06:10

    use without this operator

         RequestDispatcher rd = getServletContext().getRequestDispatcher("/SomeJsp.jsp");
        rd.forward(request, response);
        return;
    

提交回复
热议问题