Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Applets and Databases

Posted on 1998-07-07
5
209 Views
Last Modified: 2010-03-30
I have created a small Applet which uses JDBC/ODBC to allow the user to interrogate a database and change the values. The Applet works perfectly in the Applet viewer but if I try to run the Applet in a browser then it does not work. I assume that the problem is something to do with security.

How can I make the Applet work in a Browser. I am sure that there must be a way to handle databases in this way.

many thanks for your assistance...

Richard H
0
Comment
Question by:RICHARDH
  • 3
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
msmolyak earned 30 total points
ID: 1225151
The questions to you are:
Where is your applet coming from (local disk or a Web server), where the JDBC driver is installed (on the machine where the applet is running or the machine where it is coming from) and what category driver this is (that is, is it a 100% Java driver which talks natively to the database or it is a JDBC/ODBC bridge which requires loading some DLLs)?

Also what error message are you getting?

Depending on your answer we will conclude that either your applet is trying the go outside the security sandbox (and there are ways to allow applets to do that) or it can stay within a sandbox with minor tweaking.
0
 

Author Comment

by:RICHARDH
ID: 1225152
To: msmolyak,
Thanks very much for the prompt reply. I will try to answer the questions to the best of my knowledge.

1. The Applet has been produced using Lotus Bean machine and the driver is the one supplied with the package. I am not sure but I think that it is a JDBC/ODBC bridge.

2. At present, I am running the Applet on the same machine as the ODBC database in that I have published it to the Webserver which happens to be on the development machine. However I am looking at the Applet through a browser pointing to the page stored on the Web Server.

3. I do not get an error, it is simply that the data does not appear in the fields as it does when viewed as an applet, not through the browser.

I hope that this provides enough information for further comments. I am going on vacation early tomorrow so I may not pick up your repl;y for a weeks or so.

Many thanks for your help, it is much appreciated.

Richard.H
0
 
LVL 5

Expert Comment

by:msmolyak
ID: 1225153
Both IE 4 and Navigator 4 have Java consoles. Did you check those for error messages? If you indeed do not get any, could you put some print statements in your program to see where the browser behavior is different of that of the appletviewer.

Make sure you can register the driver and instantiate it.
0
 

Author Comment

by:RICHARDH
ID: 1225154
The problem with Lotus Bean machine is that you do not get a great deal of control over the script.

How do I go about testing to see if I can register and instantiate the driver.

thanks
0
 
LVL 5

Expert Comment

by:msmolyak
ID: 1225155
Can you execute your applet in one of teh abovementioned browsers? If so, simply put System.out.println("...") statements to see where the program gets stuck.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to add new optional parameter to JSP 1 49
tomcat startup error 5 102
JAVA API design with micro service cloud in mind 1 47
junit as external jar or library 7 23
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question