This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Thanks Bear Bibeault . As you said if the objects have the exact same properties, serialize the object to JSON for transport
2) Even if we do so, how we will get the this newly converted json at server side and then convert to java object ?
1) Yes. There are plenty of tools to do so. Some modern browsers have JSON built in.
2) JSON is just a string. You can pass it to the server in a hidden input (or even on the URL, but not recommended). Once on the server, it can be de-serialized into a Java construct.
If we're only talking a handful of properties, using JSON might very well be overkill. It's much more customary to pass the properties individually.
Joined: Jun 16, 2011
you mean to say that once we pass the jsonstring as hidden input(or as a part of URL) we can simply get it from httpservletrequest with the method getParameter("myJsonObjectName") and then convert to java object .Correct?
2)does the latest front end framewors like struts/dwr/ajax use the same kind of strategy internally?