Hi,
I'm trying to send a short
string to my
servlet, and I'm getting a getInputStream()already called for this request Exception. Anyone have any idea?
Thanks!!
I've included the client code below:
HttpURLConnection con = (HttpURLConnection)new URL("http://localhost:8080/ecog/sl/servlet/SLServlet?action=loansave3&loanid=1").openConnection();
con.setDoInput(true);
con.setDoOutput(true);
con.setUseCaches(false);
con.setDefaultUseCaches(false);
DataOutputStream out = new DataOutputStream(con.getOutputStream());
out.writeBytes("<Loan LoanID=1><LoanNo>aiyo</LoanNo></Loan>");
out.flush();
out.close();
return con.getInputStream();