This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet/Servlet Http tunneling

 
Sean Casey
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic