Can I pass an Object to a Servlet from a standalone Java code?
I have explored the possibiity of passing an object using HttpURLConnection Class, but this technique doesn't seem to work(Please correct me if I am wrong).
My scenario is like this :
I have an Servlet on my appserver. And my standalone java code has to pass Objects to the aforementioned Servlet. How can I do this?
It would be really nice if I can get some sample code.
Does any one has a workaround?
Thanks and regards,
What do you mean by 'standalone Java code'? Is it in a separate JVM? If so, you can use RMI or to spare the trouble just pass parameters of your object through simple HTTP and create its copy on the appserver. Could make your system clearer?
Of course you can. You can use http, your own socket and rmi.
I prefer to using http to transfer the object. It is classic, nothing new.