No use following as it might be case sensitive

con.setRequestProperty("Content-Type", "our Conent Type here");

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

Northstar Technologies, Inc.



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, August 23, 2004 3:08 PM
To: [EMAIL PROTECTED]
Subject: RE: Swing communicating with a Servlet.



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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, August 23, 2004 2:40 PM
To: [EMAIL PROTECTED]
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
[EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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
[EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to