But only for POST or PUT, whcich this code isn't using
con.setRequestProperty("Content-Type","java-internal"+objs.getClass().getNam
e());
ObjectOutputStream out = new ObjectOutputStream(con.getOutputStream());
out.writeObject(objs);
you should call con.setDoOutput(true);
or con.setRequestMethod("POST"); // JDK1.3 and above I think
In fact the code shouldn't even execute.
Thinking about it I assume there should be a call to setDoOutput(true) here
somewhere?
Kevin Jones
DevelopMentor
www.develop.com
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> Christopher K. St. John
> Sent: 18 January 2001 18:21
> To: [EMAIL PROTECTED]
> Subject: Re: urgent...
>
>
> Kevin Jones wrote:
> >
> > BTW why are you setting the Content-Type header on the request,
> > this is a response header. For a request use the 'Accept' header
> >
>
> Content-Type should be set on any HTTP message with a
> body, including requests. It's not just for responses.
> In this case the default should be fine, though, or
> set to "application/octet-stream". (I've seen the
> java-internal content types in several other places,
> does someone have a reference to where that is/was
> spec'ed?)
>
>
> -cks
>
> __________________________________________________________________
> _________
> 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
___________________________________________________________________________
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