• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

Applet to Servlet Communication

I'm trying to write a database aware applet that does not depend on the JDBC/ODBC bridge (as each client would need ODBC installed). Are there any code examples of how to actually do this ?

Any help much appreciated !
0
gng
Asked:
gng
1 Solution
 
heyhey_Commented:
use pure JDBC driver.
read the JDBC tutorial at www.javasoft.com

.... and so on .. (you'll get hundered of links very soon)
0
 
gngAuthor Commented:
A pure Java driver would be a solution but financially is not possible. I am familiar with the types of java database drivers around. It's the way to do it but to many $$$. I'd really like an example of where a servlet makes the db interactions but the clients (running an applet in a browser) can interact with the servlet. By using this approach, you have complete control on the servlet implementation (using the cheap [free] JDBC/ODBC bridge. Thanks again !
0
 
heyhey_Commented:
I just saw you question title inside the e-mail notification (you don't mention the word 'servlet' inside your question at all)

check the RMIJdbc driver for a very quick solution:

http://dyade.inrialpes.fr/membres/gibello/
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
blairdyeCommented:
Hi,
I assume you just want to know about the communication itself and not the db implementation. Here is a link:
http://www.j-nine.com/pubs/applet2servlet/Applet2Servlet.html
If you have a bit of experience with the streams library then its all very straight forward. I guess the simplest thing would be to send your result set as an ObjectOutputStream.
Hope this helps.
Blair
0
 
Ravindra76Commented:
Hi gng,

 If you want cost effective solution,

1. Write all the database code in java servlets. If you want free webserver,use apache web server. Other wise you can buy any webserver capable of running servlets

2.Call servlets from applets through URLConnection class.
 Use parameters to call different functions of same servlet.

In servlets, you can use any jdbc driver types ( 1,2,3,4 i.e jdbc-odbc bridge also)

Best of luck
0
 
vladi21Commented:
gng - r u still have questions?
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now