posted 13 years ago
I have following action class
I have following Employee model class
I have marked the no-argument constructor of Employee class as private as I want to make it singleton.
I have a form page asking username and password (with form field names emp.name and emp.password) that is mapped to Login.java Action. But when I submit form, I get an exception that saying it cannot create Employee object as its constructor is marked as private.
So how do I solve this problem still keeping the Employee object as singleton?