I want to get parameters from jsp and write it to my pseudo database (private List<Ad> aDatabase = new ArrayList<>();)
The problem is : when I fill my form and click submit button it returns null values to my servlet ( that's why I've used println to check if I am getting null values for every parameter).
Probably I am doing something wrong, I would be very grateful for any hints.
You only want to use a multi-part form when uploading files, and then the getParameter() family of methods will not work. You must process a multi-part submission differently than a "normal" submission.
By the way, the default encoding is "application/x-www-form-urlencoded". But it's best just to let it default.