(I assume you have checked your variables name
, surname
, fatherName
, department
and age
have correct values)
I have tested your code and persons are added to LinkedLists contained in AllWorkers
correctly. However, in method addEmploye()
you do this:
AllWorkers workers = new AllWorkers();
which means you create a new workers
every time you comsume the servlet, and each time that workers
will be empty since it's a new object. Maybe that is the reason it seems that persons are not added to lists.
Regards,