innspiron 0 Newbie Poster

Hello anyone,

I have code:

java.lang.System.setProperty("sun.security.ssl.allowUnsafeRenegotiation", "true");
			SSLContext ctx;
			ctx = SSLContext.getInstance("TLS");
			ctx.init(new KeyManager[0],new TrustManager[] { new DefaultTrustManager() },
					new SecureRandom());
			SSLContext.setDefault(ctx);

			Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
			URL url = new URL("https....");
			HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
			conn.setRequestMethod("POST");
			conn.setDoInput(true);
			conn.setDoOutput(true);
			DataOutputStream output = new DataOutputStream(
			conn.getOutputStream());
                        output.writeBytes("data");
			output.flush();
			output.close();

How do I edit it so that I could post two variables? data and data2?
Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.