I connected to servlet from swing using HttpURLConnection
. I did not understand this code:
DataOutputStream wr = new DataOutputStream(
connection.getOutputStream()); //connection is obj of HttpurlConnection class.
wr.writeBytes(un);//un contains username retrieved from textbox from the swing
wr.flush();
wr.close();
What is the way to read values in the servlet, so that I can do further process (like inserting into database etc..)
Is there any method other than above method or can I get values through request object?