File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can I call my servlet from VB?

 
Lisa Strite
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to call my servlet which is running fine with a web interface, from VB. We want to have a client application that uses the servlets as a back end. Is there a way to do this, especially without any middleware type software? Any suggestions would be appreciated.
 
Ajith Kallambella
Sheriff
Posts: 5782
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AFAIK, Servlets are designed to cater to the requirement of Web clients. They support Web-based protocols( HTTP ) and are used generate content that is broswer-renderable. So I can't think of anyway to make a servlet communicate with a non-browser, non-web-based client( in non-http way ).
Ofcourse I may be wrong!
Any contenders for this one??
 
Lisa Strite
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well the way our servlet currently works is, it does its database access and then redirects to a jsp page which queries the session for the data to display. I wonder if I can call the servlet from VB via http and if so, how could I get the results back.
Does anyone know if this has been done before?
 
Prasad Ballari
Ranch Hand
Posts: 149
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
Its possible.Use webbrowser component as the main communicator to servlets as it uses HTTP protocol to communicate,but your UI must be able to get the stuff from the web browser component
HTH
prasad

[This message has been edited by Prasad Ballari (edited January 05, 2001).]
 
Kevin Mukhar
Ranch Hand
Posts: 83
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ajith Kallambella:
AFAIK, Servlets are designed to cater to the requirement of Web clients. They support Web-based protocols( HTTP ) and are used generate content that is broswer-renderable. So I can't think of anyway to make a servlet communicate with a non-browser, non-web-based client( in non-http way ).
Ofcourse I may be wrong!
Any contenders for this one??

Sure there's a way. Nothing restricts HTTP to being only between web browsers and web servers. Any application can make a network connection to port 80 (or whatever port the web server is listening to). The application then uses HTTP to send a message to the server. The servlet sends a response back.
There is an example in the Java net tutorial showing how to use a java application to communicate to an http url.
I don't know VB at all, but if VB can open a socket connection to a URL, then it can communicate with a servlet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic