wood burning stoves 2.0*
The moose likes Servlets and the fly likes Problem while connecting to Servlet  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem while connecting to Servlet  " Watch "Problem while connecting to Servlet  " New topic

Problem while connecting to Servlet

ravi shankar

Joined: Nov 27, 2001
Posts: 3
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.
Client program

Servlet program.

console output is

[This message has been edited by Mike Curwen (edited November 27, 2001).]
P Kumar

Joined: Nov 27, 2001
Posts: 4
Hi can any body give the suggestion to Ravi? because I am also interested to know about this.
P Kumar

Joined: Nov 27, 2001
Posts: 4
Can any body give the sooution for my problem?
ninad parkhi

Joined: May 04, 2001
Posts: 25
Hi ,
Try this way but I am not sure whether this will work or not?
URL u = new URL("XXXX");
java.net.HttpURLConnection uConn =
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
P Kumar

Joined: Nov 27, 2001
Posts: 4
Hi Ninad,
thank you for your suggestion.but I am getting same problem.Can you suggest any other solution.
Thanks and regards
I agree. Here's the link: http://aspose.com/file-tools
subject: Problem while connecting to Servlet
Similar Threads
problem with connect with URL
what does this Exception mean???thanx!@!!!
Can't get RequestDispatcher forward() method or response.sendRedirect() to work
How to write to the servlet with standalone application