J
John
Hi all,
I just working on the following problem: I'd like to send a serialized
object from one web application to a second one by using a hyperlink.
(by the way: both are using the struts framework). The hyperlink now
should get the serialized object as a url parameter.
Im not quite firm with object serialization. For this, I have read some
topics found in several groups and I have used the following coding
found:
My hashtable is the object I'd like to send as a serialized object by
using the http post and the object should be passed as URL parameter.
public String test() {
Hashtable data = new Hashtable();
data.put("first","test value");
java.io.ByteArrayOutputStream ostream = new
ByteArrayOutputStream();
try {
ObjectOutputStream p = new ObjectOutputStream(ostream);
p.writeObject(data);
p.flush();
return p.toString();
} catch (IOException e) {
log.error(e);
return null;
}
}
Does anybody has some experiences with serializing objects and sending
them as an URL parameter?
Thanks in advance
John
I just working on the following problem: I'd like to send a serialized
object from one web application to a second one by using a hyperlink.
(by the way: both are using the struts framework). The hyperlink now
should get the serialized object as a url parameter.
Im not quite firm with object serialization. For this, I have read some
topics found in several groups and I have used the following coding
found:
My hashtable is the object I'd like to send as a serialized object by
using the http post and the object should be passed as URL parameter.
public String test() {
Hashtable data = new Hashtable();
data.put("first","test value");
java.io.ByteArrayOutputStream ostream = new
ByteArrayOutputStream();
try {
ObjectOutputStream p = new ObjectOutputStream(ostream);
p.writeObject(data);
p.flush();
return p.toString();
} catch (IOException e) {
log.error(e);
return null;
}
}
Does anybody has some experiences with serializing objects and sending
them as an URL parameter?
Thanks in advance
John