I wrote an array but it crashes once I try to access a certain webpage. I'm also using a tomcat server and Servlets. I backtracked it and found it at line 114 which is a piece of Java code.
I'm trying to print certain info that people give when they register in my webapp as an overview on another webpage which it does when I press the register button. But what a navigate manually to it crashes.
Can someone help me figure out what I did wrong in that piece of code? Thanks in advance.
114:ArrayList<Registratie> leden = (ArrayList) request.getAttribute("leden");
String result="";
for(Registratie Registratie:leden){
result = result + " <tr> <th>" + Registratie.getNaam() +"</th> \n" + "<th>" + Registratie.getAchternaam() + "</th> \n" + "<th>"
+ Registratie.getLoginnaam() + "</th> \n" + "<th>" + Registratie.getEmail() + "</th> \n" + "<th>" + Registratie.getNiveau()+"</th>" +"</tr>" + "\n";
}
photo of register process: https://i.stack.imgur.com/nYpR3.jpg
photo of database: https://i.stack.imgur.com/R2aMD.jpg
When I click on "leden overzicht" which should show an overview of all those that registered: https://i.stack.imgur.com/n3uxJ.jpg