865

Java error

if(request.getParameter("id") == null){ RequestDispatcher toView = request.getRequestDispatcher("services.jsp"); toView.forward(request, response); } if(request.getParameter("id").equals("1")){ RequestDispatcher toView = request.getRequestDispatcher("services_web_programming.jsp"); toView.forward(request, response); } else if(request.getParameter("id").equals("2")){ RequestDispatcher toView = request.getRequestDispatcher("services_software_development.jsp"); toView.forward(request, response); } else if(request.getParameter("id").equals("3")){ RequestDispatcher toView = request.getRequestDispatcher("services_multimedia.jsp"); toView.forward(request, response); }iata o bucata de cod din Dispatcher servlet.TOtul merge si se deploy-aza :), dar intotdeauna imi da o eroare, si anume NULL POINTER Exception si imi indica la rindul acesta:if(request.getParameter("id").equals("1")){dar daca id e null atunci nici nu se va ajunge aici, deoarece mai sus are loc dispatch-ul. Cine stie what's happening? :)
0