Win a copy of Spark in Action this week in the Open Source Projects forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Applet/Servlet Http tunneling

 
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a servlet named instantquote.java that queries a database and retrieves a random quote. This works fine. Now I want to create an applet that displays a random quote each time it is loaded. From my understanding I can do this with http tunneling. This is where I am lost. The doGet method of instantquote does all the action while the doPost is empty. How do I have the applet query the instantquote servlet each time the applet is loaded? In the doGet method a ResultSet is returned, and then I just get the string from that. This sounds simple, but I'm not sure how to have the applet communicate with the servlet directly???
Any help would be great. I'm lost.
Alternatively, I could skip the applet and then just have the servlet return the whole page, but I'd rather use the applet. Thanks.
Sean
 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems as I have figured it out.
Thanks anyways.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic