Can HttpServlet response an object which is an instance of my own class to the client with doGet() method or other method?
what i have in mind is to send a serialized object created in the client-side, have the server-side process it and send back a serialized object -‘backend object’- to the client-side as a response.
Take in Consideration that i just started reading about servlets, this question pooped-up into my head while doing my readings as to see if i would achieve my goal with servlets or i am going the wrong path, please be nice and don’t tell me to google it, cos i am already googling and reading everything i find about servlets.
Thank You In Advance 😀
Yes you can pass an object back to the server and get a modified object back provided you serialize the object to text and de-serialize it to your object on both sides. Look into JSON . It is one of the popular methods by which to achieve object exchange as you’ve described.