• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Connecting a VB web browser with a Java Server

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,
I'm using a basic web browser in VB so that when i type in any URL & click OK it will be sent directly to my Java server, which from there will retreive the page from the Internet & send it back to the browser to be displayed. D problem is trying to communicate VB with Java. I presume there must be some way to connect them using sockets but how. I can connect a java server & client application no problem using sockets but i don't know how to with VB. If i even got a piece of text being sent between the two with the server responding bak to it, it wud be great.
There is a webBrowser.Navigate function in VB that takes the URL in the txtbox and retrieves the pg no problem. However, i have to direct it thru my own server.
If anyone can help me please do... i know there must be some way to develop a connection between the two & the code shudn't be too difficult.
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Cella,
What port is your server listening on? Of course you realize to pull this off your server will have to communicate with the browser using the http protocol. For example, if you want to load www.yahoo.com into your browser and your server is listening on port 2000 on the same machine, you would have to enter something like http://localhost:2000?www.yahoo.com. Then your server would have to GET the paramater embedded in the URL (www.yahoo.com), fetch the page and send it back to the browser, using the expected protocol responses.
Hope this helps,
Michael Morris
 
cella hatcher
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Michael,
thanx for ur speedy reply. As for the port i'm gonna connect my server to it will prob be 5000 - something like that. I've been looking up how to read & write data from VB (in this case a URL) but theres so many different versions. I'm working from VB6 & i know I have to send d URL to the server using the http protocol but really dunno how. There's a Winsock control in VB but dunno how to apply this.
Im close enough to the answer but if uv any ideas wud greatly appreciate it... thanx,
cella
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic