Did, but still nothing. I think that problem is in my servlet. I'm sure that I did something wrong or didn't do something that I have to.
here is the servlet code:
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
String username = request.getParameter("username");
String password = request.getParameter("password");
if(username.equals("student") && password.equals("password")){
request.getSession().setAttribute("newList", Metoda.getGeneratedData());
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/WEB-INF/kupovina.jsp");
dispatcher.forward(request, response);
/*request.setAttribute("novaLista", Metoda.getGeneratedData());*/
}
else{
final String rez = "Login failed! Try Again!";
request.setAttribute("Rezultat", rez);
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/login.jsp");
dispatcher.forward(request, response);
}
}