File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Applet/Servlet Http tunneling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Applet/Servlet Http tunneling" Watch "Applet/Servlet Http tunneling" New topic
Author

Applet/Servlet Http tunneling

Sean Casey
Ranch Hand

Joined: Dec 16, 2000
Posts: 625
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

Joined: Dec 16, 2000
Posts: 625
It seems as I have figured it out.
Thanks anyways.
 
 
subject: Applet/Servlet Http tunneling