UrlConnection SetRequestProperty

C

carl.manaster

I have an applet and servlet talking to one another through a
UrlConnection. I've been sending Strings across without problems.

My applet's connection initialization code includes this line:

connection.setRequestProperty("Content-Type",
"application/octet-stream");

I am now trying to send different kinds of Serializable objects through
the connection. I have seen a number of examples that say to use

"java-internal/" + obj.getClass().getName()

in place of "application/octet-stream" in my call to
setRequestProperty(), and I'll try that, but I don't see any sign on
the servlet side that this information is being used. Is this simply a
convention, or does it hold some meaning that actually gets used by the
servlet? If it holds meaning, then why was my code working with
Strings?

Thanks for any clarification or references.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,147
Latest member
CarenSchni
Top