From: Angelo Marchionni on
I m trying to send data from applet to servlet in this way

ObjectOutputStream outputToServer = new
ObjectOutputStream(servletConnection.getOutputStream());
outputToServer.writeObject(user);
outputToServer.flush();
outputToServer.close();

I expect data goes to doPost method of the servlet.
But when I execute the above portion of the code just the doPost
method is not called.
What do I do wrong ?

Thanks

From: markspace on

You'll need to show us the code before "new ObjectOutputStream(...".
There must be something in the way you are setting up the HTTP
connection that is causing an issue.

Have you tested this servlet yet? Can it receive any POST at all, even
from a browser? It doesn't hurt to verify the other side too, just in
case the problem isn't where you think it is.
From: Arne Vajhøj on
On 15-02-2010 07:37, Angelo Marchionni wrote:
> I m trying to send data from applet to servlet in this way
>
> ObjectOutputStream outputToServer = new
> ObjectOutputStream(servletConnection.getOutputStream());
> outputToServer.writeObject(user);
> outputToServer.flush();
> outputToServer.close();
>
> I expect data goes to doPost method of the servlet.
> But when I execute the above portion of the code just the doPost
> method is not called.
> What do I do wrong ?

Do you call:

servletConnection.setRequestMethod("POST");

?

Arne