• 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

Closing the circle : www-applet-servlet-db

 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All.
I want someone from www to surf into my site, choose an option (applet) which invokes a servlet in Tomcat to access a database and send the formatted data back to the www.
Sofar I got Apache collaborating with Tomcat and I got the servlet to use a pool of Oracle connections to select the data from the db.
I also understand in rudimentary form how to use the applet/HTML <form...> tag to invoke a a servlet.
How do I get www to an invoke an applet using <Form...> to get a Tomcat servlet to access Oracle if multiple pages are fetched back ???
Typically it will be at most one page, but sometimes two or more.
Please help me close this circle if you can.
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't do applets in a form in the way I think you mean. Instead, the applet IS the form. That is, instead of defining HTML form data, define the form's controls using AWT (Swing requires the Java plugin, so avoid that if you can. It's a 5+MB download and very rude to users).
Note that an unsigned applet can't simply do JDBC calls to talk to the database. Firstly because the Java Sandbox forbids it and secondly because chances very high are that the JDBC driver will use a TCP/IP channel that someone's firewall won't allow. There's a trick called "HTTP tunneling" to get around that - the applet sends/recieves internal HTTP requests to a JSP or servlet - or for that matter, even a CGI - and the server-side code does the actual database I/O.
I recommend you visit a bookstore, since while straightforward, the process is a little too invovled to describe here.
 
achana chan
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim !
Could you recommend some books on this subject matter please.
I understand the choice of AWT , however I am concerned that AWT cannot generate a directory listing (much like what u got in MS Explorer), where the user can make a choice from several and using an indexed search , the servlet will fetch format and display it.
Certainly AWT has smaller footprint and faster than SWING over the net.
 
So it takes a day for light to pass through this glass? So this was yesterday's tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic