Try adding:
uc.setRequestMethod("POST");
Before you get the output stream.
Also, a word of caution. I have found that if the response from
the web server takes longer that the keep-alive timeout value set
for your web sever, your applet will not be notified (no exception
thrown). I client will hang on the read "forever". I've tried
looping on the available() method of InputStream but it always
returns 0 (zero) bytes and never throws an exception, even if the
web server has closed the connection.
Maybe some one has a suggestion that could help both of us???
--- Carlos R Armas <[EMAIL PROTECTED]> wrote:
>
> I am using something like the following (applet):
>
> URL url = new URL("http://localhost:8080/...");
> URLConnection uc = url.openConnection();
> uc.setDoOutput(true);
> uc.setDoInput(true);
> uc.setUseCaches(false);
> uc.setRequestProperty(...);
> DataOutputStream out = new DataOutputStream(uc.getOutputStream());
> out.writeBytes(...);
> out.flush();
> out.close();
>
> then I use InputStreamReader to read whatever the servlet sent back.
>
> My assumption was that this is the mechanism to send POST data from
> the
> applet. Maybe here is my mistake.
>
> I haven't tried calling doPost from the doGet method.....
>
>
>
>
> Wyn Easton wrote:
> >
> > Carlos - I'm curious, how are you sending the data from the applet
> > to the servlet? Why do you think the applet is setup to use the
> "POST"
> > method?
> >
> > You could always call your doPost() method in your servlet from
> > the doGet() method.
> >
> > --- Carlos R Armas <[EMAIL PROTECTED]> wrote:
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
=====
Wyn Easton
[EMAIL PROTECTED]
__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]