I started to learn servlets and JSP, I ran into a problem: the JSP did not get requests:
request.getRequestDispatcher("index.jsp"); ArrayList users = new ArrayList(); try { EasyDB db = connectDB("postgres", "wasd123wasd5" , "javaTest"); users = db.MakeQuerry("SELECT \"Name\", \"Password\", \"ID\", \"FullName\"\n" + " FROM \"Users\";\n"); } catch (SQLException e) { e.printStackTrace(); } request.setAttribute("users", users); System.out.println(users); request.getRequestDispatcher("index.jsp").forward(request, response); } This is a servlet, I pass the variable users to it, this is an ArrayList , and I know that users !=null , but nothing comes to JSP:
<% out.print(request.getAttribute("users")); %> this code is null , I’ve checked it a hundred times, all of a sudden, users are still null , but in the console and with all the other ways of checking users all the same something exactly what I need, help, what to do? Just like in the examples on the Internet.