Jason Grant wrote:

> I'm writing a servlet that will filter requests based on content type.  I
> want it to process serialised java objects from a client that I am also
> writing, and want to use the correct content type rather than inventing
> one.
>
> I've seen references to the following types (in mailing lists, etc), but am
> unsure as to which is correct:
>
>  application/java
>  java/object
>  application/x-www-form-urlencoded
>
> I've also looked at the registry of MIME types at:
>
>  http://www.isi.edu/in-notes/iana/assignments/media-types/media-types
>
> but there's no reference to java objects.  RFCs say to avoid using the "x-"
> types, as these are unregistered and thwart interoperability.
>
> Is there a [defacto] standard, or a recommendation?
>
> TIA,
>
> Jason.
> [...]

Hi :-) from several emails in Servlet-List, I also find the following about
using serializable object in Applet-Servlet communication:

- con.setRequestProperty("CONTENT-TYPE",
"application/x-java-serialized-object");
- con.setRequestProperty("CONTENT_TYPE", "application/octet-stream");

and from Jason Hunter's book, P296,
con.setRequestProperty("CONTENT_TYPE",
java-internal/"+obj.getClass().getName());


Bo
Apr.03, 2001

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to