This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to invoke a servlet running on IIS server from a java application??  RSS feed

 
Sajee Joseph
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,
We are developing a Chat kinda application. Both the client and the server programs are written in java. We are running the IIS Server with ServletExec servlet engine.
We have put our servlets in the "Servlets" directory. We are able to invoke this servlet from the browser. But when we try to execute the servlet from our client java application using URL connection, we get the "FileNotFound" exception. Why is this so?... A fragment of the clinet code that makes a connection to the servlet is given below
1 URL url = new URL("http://SomeServer/servlet/MyServlet");
2 URLConnection connection = url.openConnection();
3 connection.connect();
4 in= new BufferedReader( new InputStreamReader(connection.getInputStream()));
The exception is got at the 4th line. Ie the Exception is thrown when we try to read the input stream. Another thing is that this servlet worked fine when we used Java WebServer instead of IIS server...
Pls help me out
....Regards
......Sajee Joseph
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!