Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem while connecting to Servlet

 
ravi shankar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am getting problem when I am trying to connnect the servlet with stand alone java application using URLConnection.Here I Am sending the code and console output from JSWK server.Please give the solution.
thanks.
////////////////////////////////////////////////////
Client program

//////////////////////////////////////////////////////////////
Servlet program.
////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////
console output is
/////////////////////////////////////////////////////////


[This message has been edited by Mike Curwen (edited November 27, 2001).]
 
P Kumar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi can any body give the suggestion to Ravi? because I am also interested to know about this.
thanks
Kumar
 
P Kumar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any body give the sooution for my problem?
 
ninad parkhi
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
Try this way but I am not sure whether this will work or not?
URL u = new URL("XXXX");
java.net.HttpURLConnection uConn =
(HttpURLConnection)u.openConnection();
uConn.setDoInput(true);
uConn.setDoOutput (true);
uConn.setUseCaches (false);
// uConn.setRequestMethod("POST");
// uConn.setRequestProperty ("Content-Type", "application/x-www-// form-urlencoded");
Let me know whether it worked or not
Thanks,
Ninad
 
P Kumar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ninad,
thank you for your suggestion.but I am getting same problem.Can you suggest any other solution.
Thanks and regards
Hari.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic