thanks a lot...!

I've tried it before posting this message but after your post I review it
again and this time works.. !

the Protocol as i'm using it ... is marked as deprecated... any ideas about
how to improve it... or where is an explanation of how the
ProtocolSocketFactory should be used instead...

thanks again..


this is the code if any one needit... (I'm using ssl too)
Protocol.registerProtocol ("https", new Protocol("https", new
EasySSLProtocolSocketFactory(), 8443));

        HttpClient client = new HttpClient();
        String url = " https://localhost:8443/testHTTPClient/testServlet2";;


        PostMethod methodP = null;

        try {
            //make post
            methodP = new PostMethod( url );

            methodP.setRequestEntity(new RequestEntity() {
                public boolean isRepeatable() {
                    return false;
                }

                public void writeRequest(OutputStream out) throws
IOException {
                    ObjectOutputStream objStream = new
ObjectOutputStream(out);
                    objStream.writeObject(new Date());
                    objStream.flush();
                    objStream.close ();
                }

                public long getContentLength() {
                    return -1;
                }

                public String getContentType() {
                    return "application/octet-stream";
                }
            });



David Casta;eda... a happy mail list user :)

On 3/23/06, Roland Weber <[EMAIL PROTECTED] > wrote:
>
> Hi David,
>
> > now I want to implement the opposite .... the client making the request
> but
> > send Object as a parameter...
> >
> > PostMethod methodP = new PostMethod( url );
> > // here how do I put my object so I can readit in the servlet by
> > ObjectInputStream
> >
> > any ideas,,,,??? thanks a lot
>
> Implement the RequestEntity interface:
> http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/methods/RequestEntity.html
>
>
> cheers,
>   Roland
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
David Castañeda R.

Reply via email to