tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <anunay.ash...@wipro.com>
Subject RE: Swing communicating with a Servlet.
Date Mon, 23 Aug 2004 10:08:04 GMT

I am trying to set the content type as
c.setRequestProperty("content-type",
"application/x-www-form-urlencoded");
Is it okay?

-----Original Message-----
From: Shakeel [mailto:shakeel@globalnorthstar.com]
Sent: Monday, August 23, 2004 3:30 PM
To: Tomcat Users List
Subject: RE: Swing communicating with a Servlet.

try followings
or set content type explicitly

con.setDoInput(true);
con.setDoOutput(true);
con.setUseCaches(false);

S H A K E E L   A H M A D
(EE, SCJP, SCWCD & SCBCD)

Northstar Technologies, Inc.



-----Original Message-----
From: anunay.ashish@wipro.com [mailto:anunay.ashish@wipro.com]
Sent: Monday, August 23, 2004 2:40 PM
To: tomcat-user@jakarta.apache.org
Subject: Swing communicating with a Servlet.



Hi,
I am trying to send data from a swing application to a Servlet.
I am having the following piece of code within the action event of a
button
URL callback = new
URL("http://localhost:8080/UMSDriver/SwingToServlet");
URLConnection c = callback.openConnection();
c.setDoOutput(true);
c.setUseCaches(false);
System.out.println(c.getContentType());
But the value that is printed out in the console is "null".
Why is it so? Where am I going wrong?
Regards,
Anunay Ashish.



Confidentiality Notice
The information contained in this electronic message and any attachments
to
this message are intended
for the exclusive use of the addressee(s) and may contain confidential
or
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or
Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




Confidentiality Notice

The information contained in this electronic message and any attachments to this message are
intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information.
If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com
immediately
and destroy all copies of this message and any attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message