Currently I have a Java servlet that takes in a serialized POJO through the request. It works when I send a request from a Java client to the servlet. My question is: is there a way to make such a request through JavaScript using AJAX passing the Java object directly as opposed to converting it to a JSON first? This is how my server receives the Java object
ObjectInputStream inData = new ObjectInputStream (request.getInputStream());
SomeClass mUser = (SomeClass) inData.readObject();