jQuery in Action, 2nd edition*
The moose likes Servlets and the fly likes Can I call my servlet from VB? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Can I call my servlet from VB?" Watch "Can I call my servlet from VB?" New topic
Author

Can I call my servlet from VB?

Lisa Strite
Greenhorn

Joined: Dec 19, 2000
Posts: 4
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

Joined: Mar 17, 2000
Posts: 5782
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??


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Lisa Strite
Greenhorn

Joined: Dec 19, 2000
Posts: 4
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

Joined: Sep 23, 2000
Posts: 149
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

Joined: Nov 28, 2000
Posts: 83
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can I call my servlet from VB?