From: Angelo Marchionni on 15 Feb 2010 07:37 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 15 Feb 2010 11:07 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 15 Feb 2010 14:42 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
|
Pages: 1 Prev: Adding JPanel to JFrame Next: ANN: GR8 in the US 2010 Conference Registration Now Open! |