tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos R Armas <ar...@lucent.com>
Subject Re: applet-servlet communication
Date Tue, 30 Jan 2001 14:50:44 GMT

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 <armas@lucent.com> wrote:
> >

Mime
View raw message