JDBC in applet URGENT

Hi,
I have created an application by using JDBC,now i would like to convert this application into applet and put it online. So i register a domain name, create a jar file for this application and use browser to load it. But so far from what i know, online features have to be done by using JSP,so is it possible to use JDBC to connect to database and do functions online?If not,it means i have to replace JDBC by JSP?
Thanks for any help.

Hi
Please make note of some points:
1. You can very well create your application as an Applet and then connect to a database through JDBC.
2. If you think you can make use of the server resources properly you can go ahead with your applet. Otherwise you can switch to JSP, but you may not get any useful resources like Swing, JFC and other stuff through plain jsp, for all these you need an applet as a container for these.
The problems you are facing is because applets are not secure, you need to sign your applet so as to make use of the system resources available and the applet to interact with your client machines. when you create your jar file you have to sign it using the jarsigner bound to a security certificate installed. Through java you can create your own self signed certificate with the keytool option available in your jdk. Then you have to use the HTMLConverter and pass the HTML file containing the applet tags pointing to your class file, this will convert the applet into browser readable format. Then you are all set, open the applet through your browser and <b>BINGO</b> you are up and moving.
If you have any more doubts please feel free to ask me.
Thanks
Swaraj

Similar Messages

  • Use of jdbc in applets

    hi ,
    i am priya i am a learner of java and i am facing some of the problems in using jdbc with applets
    i am using ms-access as database and it shows some error messages when i compile the code such as
    access denied due to applet security etc
    So, please help me in this way so that i can use applets with jdbc
    thanx,

    I second that. Using JFrame instead of JApplet is easy once you've seen an example:
    http://java.sun.com/docs/books/tutorial/uiswing/learn/example1.html
    When learning Swing, I can think of only disadvantages to using JApplet over
    JFrame. Why do textbooks use applets? Old habits die hard and they
    are out-of-date in their view of Java.
    Side comment: when learning a new topic, like JDBC, I would
    strongly advice you to write the simplest possible code at first.
    In other words, skip the Swing and write simple console apps:
    1. select and dump the contents of a table.
    2. gradually do more sophisticated selects...
    3. insert a record into a table using some fixed values.
    3. delete records from a table.
    4. update records using some fixed values.
    Once you are comfortable doing CRUD, and used PreparedStatement!,
    then add a GUI. And if your code is well-written, the GUI and the back-end
    are separate enough anyway, that you can write and test them apart.

  • JDBC through Applet...

    We are getting 'AccessControlException' while using JDBC through Applet.
    Can anybody suggest the changes to be made in the policy file OR security setting OR security Manager.

    The tutorial gives help about it at :
    http://java.sun.com/docs/books/tutorial/security1.2/tour1/index.html
    hope it will help.

  • JDBC & Applets(urgent)

    Hi,
    On my pc i have installed only JDK 1.1.6. Do i need to install some more plugins for my JDBC connection to work on my applet?Do i need to have the SDK?
    Please reply

    JDBC connection to work on my applet?How are you running the applet? How do you intend to run the applet?
    If you are running in the AppletViewer then you have everything you need.
    An applet to jdbc connection should never be used over the internet regardless of the connection type used. So if that is your intent I suggest you re-think the design.
    Running 1.1.6 jdbc in a browser is significantly different than for 1.2. I am not sure what needs to be done. Either it is very easy or you need to write your own Security Manager.

  • Jdbc and applet

    I have Jdbc code which is running fine as a stand alone program. When i integrated it with an apllet it gives me
    access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
    I m using netbeans. 3.6 The intersting thing is the code runs when I debug it But gives the above error when i execute it. I hope some one can help me out. It is urgent

    You should urgently read this:
    http://java.sun.com/docs/books/tutorial/applet/overview/security.html

  • DOM parsing In Applet (URgent)

    Is it possible to implement DOM parsing in Applet?
    I am getting classnotfoundException .
    I am giving the code below. pl read the code.
    Applet.(parserapplet.java)
    =========================
    import java.io.*;
    import java.awt.*;
    import java.net.*;
    import java.util.*;
    import java.applet.*;
    import com.security.*;
    // for DOM parsing ....
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.w3c.dom.Document;
    import org.w3c.dom.DOMException;
    public class parserapplet extends Applet
    public void init()
    public void start()
    try
    if (Class.forName("com.ms.security.PolicyEngine") != null)
    {  // required for IE
         PolicyEngine.assertPermission( PermissionID.SYSTEM );
    catch (Throwable cnfe)
         System.out.println("Policy Engine Exception: " + cnfe);
    try
         String str = "<?xml
    version=\"1.0\"?><html><body></body></html>";
         ByteArrayInputStream bis = new
    ByteArrayInputStream(str.getBytes());
         System.out.println("After creating input stream");
         BufferedInputStream bufIn     = new BufferedInputStream(new
    DataInputStream(bis));
         parseXMLMessage     (bufIn);
    catch(Exception e){}
    // Actual DOM parsing goes here.....
    public void parseXMLMessage(InputStream xmlMessage)
    Document document      = null;
         DocumentBuilder documentBuilder           = null;
         DocumentBuilderFactory documentBuilderFactory     = null;
         try
         documentBuilderFactory = DocumentBuilderFactory.newInstance();
         documentBuilder     = documentBuilderFactory.newDocumentBuilder();
         document     = documentBuilder.parse(xmlMessage);
         System.out.println("Document node: " + document);
         catch(FactoryConfigurationError fce)
         System.out.println("Exception Factory configuration error " + fce);
         catch(ParserConfigurationException pce)
         System.out.println("Exception Parser configuration Exception " pce);
         catch(SAXException saxe)
         System.out.println("Exception SAX error " + saxe);
         catch(Exception e)
         System.out.println("Exception " + e);
    Html code:
    =========
    <html>
    <body>
    <APPLET code="parserapplet.class" archive = "xalan.jar" width=0
    height=0
    MAYSCRIPT>
    <param name=cabbase value=MyApplet.cab>
    </APPLET>
    </body>
    </html>
    I have signed the Applet using signcode utility and i have put the
    parserapplet.class in the MyApplet cab file and signed it. On invoking
    the html file, it request for permission, and after clicking yes, the
    applet loads.Fine.
    No problem upto this stage.
    But after loading of the applet the following exception is thrown in
    Javaconsole.
    Exception:
    =========
    com.ms.security.SecurityExceptionEx[Host]: cannot access file
    C:\WINNT\Java\lib\jaxp.properties
    at com/ms/security/permissions/FileIOPermission.check
    at com/ms/security/PolicyEngine.deepCheck
    at com/ms/security/PolicyEngine.checkPermission
    at com/ms/security/StandardSecurityManager.chk
    at com/ms/security/StandardSecurityManager.checkRead
    at java/io/File.exists
    at javax/xml/parsers/DocumentBuilderFactory.findFactory
    at javax/xml/parsers/DocumentBuilderFactory.newInstance
    at parserapplet.parseXMLMessage
    at parserapplet.init
    at com/ms/applet/AppletPanel.securedCall0
    at com/ms/applet/AppletPanel.securedCall
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.run
    at java/lang/Thread.run
    javax.xml.parsers.FactoryConfigurationError:
    java.lang.ClassNotFoundException:
    org/apache/crimson/jaxp/DocumentBuilderFactoryImpl
    at javax/xml/parsers/DocumentBuilderFactory.newInstance
    at parserapplet.parseXMLMessage
    at parserapplet.init
    at com/ms/applet/AppletPanel.securedCall0
    at com/ms/applet/AppletPanel.securedCall
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.run
    at java/lang/Thread.run
    I dont know which .jar file to archive (i tried xalan,crimson, jaxp
    but which of no use). I was surprised why the security Exception is
    thrown , when parsing.
    I have not accessed the System files!( but it searches for
    jaxp.properties file!). I think the jar file is not downloaded. How to
    verify that it is downloaded in applet?
    The above code is only for sample.
    If anybody who knows how to correct it please mail me at:
    "[email protected]" with corrected code. I want this very
    urgently.
    Help meeeeeeeeeeeeeeeeeeee!!!!!
    Prasanna.

    Have you found the answer to this problem? I am having a similar problem when running the parser in an ActiveX Bean.
    THanks

  • ClassNotFoundException in applet-urgent

    Hai
    I am having an applet "tstapplet" whose class file is stored in a jar file and the applet is inside a package named test.
    I wrote the following applet tag
    <applet code="tstapplet.class" archive="../deploy/showj.jar">
    </applet>
    I am getting ClassNotFoundException ; tstapplet.class
    What should I do Is the applet code wrong
    Plz help urgent
    tintuthilak

    <applet code="test.tstapplet" archive="../deploy/showj.jar">
    </applet>
    Try to open it with Firefox or Mozilla (you can be sure MSJVM does not try to open
    the applet).
    When it works convert the html page with [jdk.home]\bin\htmlconverter.exe

  • RMI + JDBC + file transference - URGENT!!

    Ol� pessoal tenho uma d�vida a qual tenho que utilizar comandos JDBC de forma remota e tenho que fazer a transfer�ncia de arquivos, algu�m tem id�ia de como fazer isso?
    Entre RMI e sockets achei sockets mais complicado, o problema que RMI n�o � nada simples, algu�m poderia me ajudar?
    Hello people, I have a doubt which I have that to use commands JDBC of remote form and have that to make the transference of archives, somebody has idea of as to make this?
    Between RMI and sockets a think that sockets more complicated, and the problem is RMI is not simple, somebody could help me?

    wanderley.drumond wrote:
    Ol� pessoal tenho uma d�vida a qual tenho que utilizar comandos JDBC de forma remota e tenho que fazer a transfer�ncia de arquivos, algu�m tem id�ia de como fazer isso?
    Entre RMI e sockets achei sockets mais complicado, o problema que RMI n�o � nada simples, algu�m poderia me ajudar?
    Hello people, I have a doubt which I have that to use commands JDBC of remote form and have that to make the transference of archives, somebody has idea of as to make this?
    Between RMI and sockets a think that sockets more complicated, and the problem is RMI is not simple, somebody could help me?Please avoid using the highly irritating word "URGENT!!" in your subject line in future.
    The first question I would ask is where are these files now? Are they in a database? Or are you trying to put them into a database.
    The second question is what is the client? Remote? Web? Internet?
    If the files are going in/out of the database directly then the simplest solution is just straight JDBC. If there is some complication (like the client is web-based) then maybe something else is required.
    I don't see RMI being a solution here. Possibly but I doubt it (on the basis that if the scenario means that the RMI solution was feasible then I would think the direct JDBC solution would also be feasible) . Maybe FTP.
    I think you may need to get some English help or try on a Spanish language forum though. We'll see how it goes but I do find your question difficult to understand, I only get a general drift of what you are saying but as demonstrated by my questions above I don't really get the specifics.

  • Problem with Using JDBC in Applet

    Hi,
    i have written an applet to log in (it checks the database, if the username and pasword exists it shows corresponding message). i use access or sql server and applet is started but no message is shown(i think it does not connect to database). here is my code:
    import javax.swing.*;
    import java.sql.*;
    import java.awt.event.*;
    import java.awt.*;
    public class appletDatabase extends JApplet implements ActionListener {
    JLabel l1;
    JLabel l2;
    JLabel l3;
    JTextField tf1;
    JPasswordField tf2;
    JButton btn;
    Connection cn;
    Statement st;
    String hostname;
    public void init() {
    hostname = "localhost";
    l1 = new JLabel("User Name: ");
    l2 = new JLabel(" Password: ");
    l3 = new JLabel(" ");
    tf1 = new JTextField(20);
    tf2 = new JPasswordField(20);
    btn = new JButton("Sign in");
    Container c = getContentPane();
    c.setLayout(new FlowLayout(FlowLayout.LEFT));
    c.add(l1);
    c.add(tf1);
    c.add(l2);
    c.add(tf2);
    c.add(btn);
    c.add(l3);
    btn.addActionListener(this);
    setSize(300,300);
    setVisible(true);
    public void actionPerformed(ActionEvent e) {
    if (e.getSource()==btn) {
    boolean b = check(tf1.getText(),new String(tf2.getPassword()));
    if (b) {
    l3.setForeground(Color.green);
    l3.setText("Username and password exists. ");
    else {
    l3.setForeground(Color.red);
    l3.setText("Username and/or password does not exist.");
    public boolean check(String un, String pass) {
    String query="SELECT * FROM Table1 WHERE username LIKE'"+un+"'" +
    " AND password LIKE'"+pass+"'";
    boolean b = false;
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    cn = DriverManager.getConnection("jdbc:odbc:login");
    st = cn.createStatement();
    ResultSet rs = st.executeQuery(query);
    if (!(rs==null))
    if (rs.next())
    b = true;
    rs.close();
    st.close();
    cn.close();
    } catch (SQLException e1) {
    e1.printStackTrace();
    } catch (ClassNotFoundException e1) {
    e1.printStackTrace();
    return b;
    }

    The first thing i notice is that there's a problem with your SQL statement.
    To start with you should probably be using PreparedStatements cause it deals with the passing of variables very well and cleanly.
    But if you must use a straight statement then it should be like this:
    String query = "SELECT * FROM Table1 WHERE username LIKE '"+un+"'" + " AND password LIKE '"+pass+"'";
    The fact that you were mising a few spaces wouldn't have helped. Although if you were to use a prepared statement, it would be a lot easier to understand where things were being passed and you don't need to worry about those single quotes for certain values.
    Wes

  • Cann't access oracle 9i with thin jdbc and applet

    Hi..
    I write thin jdbc applet and application programs..
    application programs works well..
    but applet cann't connect...
    error messages below..
    access denied (java.util.PropertyPermission oracle.jserver.version read)
    web server and dbms server are on same machine...
    applet programs is in the demo applet program of oracle's installation folders...
    I hope your comment...
    thanks..

    Hi Hyun,
    This is basically just a guess -- since you didn't provide a lot of information (in my opinion) -- but I assume that "oracle.jserver.version" is some "System" property.
    Due to the security restrictions placed on an applet (and which aren't imposed on an application), an applet cannot access all of the "System" properties -- only some of them (like "java.version", for example). So that's why (I think) your application works, but your applet doesn't.
    There are several workarounds for overcoming an applet's security restrictions -- the most popular (as far as I know) is to "sign" your applet. There are many Internet resources available that explain how to "sign" an applet -- a simple Internet search will be more than enough to get you going (if that's at all relevant to your situation).
    Hope this has helped you.
    Good Luck,
    Avi.

  • Jdbc in applets

    I get the applet panel displayed in a web page. however when the user clicks on the button contained within the panel, nothing happens. In the appletviewer clicking on the button leads to a applet window containing data retrieved from the database (which is required)???

    there is lots of stuff on this site about applet signing. It seems complicated at first but its not that bad. In fact, if you had looked first, you would see there is a signed applet forum (!)
    anyway, signing the applet is all very well but the crux of it is that applets connecting straight into databases is not good design. If you are just learning, however, then you might try it out but you probably won't (or at least shouldn't) be asked to do it on a job.
    maybe if u used a servlet for JDBC, and the applet could connect to that?

  • SQL Server 2000 - JDBC + Java Applet problem

    Hai
    I have some problem connecting my SQL server database with Java.
    I use Applet to make my interface.
    I use Windows 2000 server.
    Here is my program listing :
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.sql.*;
    public class VLookup extends JApplet {
    String database = "jdbc:odbc:Driver={SQL Server};SERVER=Windows2000;uid=sa;pwd=;Database=User-Phone Database";
    String user = "sa";
    String password = "";
    Statement s;
    Connection c;
    JTextField searchFor = new JTextField(10);
    JLabel completion = new JLabel(" ");
    JTextArea results = new JTextArea(40, 20);
    public void init() {
    searchFor.getDocument().addDocumentListener(new SearchL());
    JPanel p = new JPanel();
    p.add(new Label("ID to search for :"));
    p.add(searchFor);
    p.add(completion);
    Container cp = getContentPane();
    cp.setLayout(new BorderLayout());
    cp.add(p, BorderLayout.NORTH);
    cp.add(results, BorderLayout.CENTER);
    try {
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
    c = DriverManager.getConnection(database, user, password);
    s = c.createStatement();
    } catch(Exception e) {
    results.setText(e.getMessage());
    class SearchL implements DocumentListener {
    public void changedUpdate(DocumentEvent e){}
    public void insertUpdate(DocumentEvent e){
    textValueChanged();
    public void removeUpdate(DocumentEvent e){
    textValueChanged();
    public void textValueChanged() {
    ResultSet r;
    if(searchFor.getText().length() == 0) {
    completion.setText("");
    results.setText("");
    return;
    try {
    r = s.executeQuery("SELECT " + "Tipe " + "FROM " + "Time " + "WHERE " + "(Tipe Like '" + searchFor.getText() + "%') "
    + "GROUP BY " + "Tipe " + "ORDER BY " + "Tipe " );
    if(r.next())
    completion.setText(r.getString("Tipe"));
    r = s.executeQuery("SELECT " + "ID_Pengguna, Phone_Number, Tipe " + "FROM " + "Time "
    + "WHERE " + "(Tipe ='" + completion.getText() + "') "
    + "GROUP BY " + "ID_Pengguna, Phone_Number, Tipe "
    + "ORDER BY " + "ID_Pengguna, Phone_Number " );
    } catch(Exception e) {
    results.setText(searchFor.getText() + "\n");
    results.append(e.getMessage());
    return;
    results.setText("");
    try {
    while(r.next()) {
    results.append(r.getString("ID_Pengguna") + ", " + r.getString("Phone_Number") + ", " + r.getString("Tipe") + "\n");
    } catch(Exception e) {
    results.setText(e.getMessage());
    public static void main(String[] args) {
    JApplet applet = new VLookup();
    JFrame frame = new JFrame("User ID");
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e){
    System.exit(0);
    frame.add(applet);
    frame.setSize(500, 200);
    applet.init();
    applet.start();
    frame.setVisible(true);
    } ///:~
    And java catch error like this : access denied (java.lang.RuntimePermission access ClassInPackage.sun.jdbc.odbc)
    What is wrong ??
    Is there any problem with my DNS ? 'cos I don't know how to set up my DNS.
    Can u help my with this problem ??
    Thank's

    You need to read up on what applets are capable of. Applets generally cannot open connections to things like databases due to sandboxing. There are a couple of ways to get around this. The applet can connect to a servlet on the same machine from which it came and have the servlet do the database accesses. Alternately, you can create a signed applet which allows you to get around some of these sandboxing issues.If tried to make localhost on my computer ( by setting my IIS configuration setting, and using Configure SQL XML Support in IIS I've created a new http://localhost/skripsi to my SQL database.
    Is there any command that I have to add to my program listing so the applet can work as I wish ??
    Is there any way to use applet to connect my database withaout using servlet, and can u explain siggned applet to mey ??
    Sorry, I don't really know java very well.
    driver type 4 ??

  • JDBC and Applets

    I'm trying to view results of a query in an applet.
    Keep getting the error
    ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver
    I know there is security issues. can i get around them???
    This application runs perfect in a driver program...
    can anyone help??????
    Thanks

    I set the policy tool but it still returning "ClassNotFoundException"
    Could you check my code to see if there is anything wrong???
         String url = "jdbc:odbc:timetable";
         String query = "select Day, Room from Thirdyear";
         try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
         } catch(Exception ex) {
         text.appendText("My Error: \n" + ex);
    text.appendText("\n" + ex);
    System.out.println(ex);
         // return;
         try {
         Connection con = DriverManager.getConnection(url, "", "");
         Statement stmt = con.createStatement();
         ResultSet rs = stmt.executeQuery(query);

  • JDBC with Applet

    Hi All,
    My program uses Applet with JDBC. Everything in the program seems to be fine, but the error displayed does not give me a clue of where i'm going wrong. This is the error...
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at Applet1.connectToDB(Applet1.java:60)
         at Applet1.access$0(Applet1.java:56)
         at Applet1$1.actionPerformed(Applet1.java:44)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    and the func to establish the connectivity is as given here..
    private void connectToDB(ActionEvent e)
              try { // load the driver
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    } catch (Exception e1) { // problem loading driver, class not exist?
    e1.printStackTrace();
    return;
    try {
    //connection = DriverManager.getConnection();
    con = DriverManager.getConnection("jdbc:oracle:thin:@my.com","nit","nit");
    System.out.println("Connection successful!");
              empValues.setText("Connected to the Database.Fetching Values from DEPT Tables.\n");
    fetchValues();
    } catch (SQLException ex) {
    System.out.println("Connection Error = " + ex.toString());
    please let me know where i'm going wrong....
    thanks,
    ng

    The problem is not with the port number. The driver class is not found in your case. You need to have the driver class in the classpath. I am not sure how this is done for applets. You could check the applet tutorial for that.
    But, as I am thinking about the problem, if your applet is directly executing JDBC, you will need to include the driver jar with the applet. This will make the applet bulkier and slower to download since the applet is downloaded on the client side. What you should do is use a server-side component, a servlet prefereably, which will manage the database calls and communicate with the applet. This will eliminate the need for including the driver jar with the applet.

  • Policies, JDBC and applets

    I have looked all over the WWW for info on this and have found loads of questions but not one clear cut answer. It's amazing the number of "OK, thanks, I got it working" without saying how. Here is my problem. I have a JDBC applet, running on IE. If I run it locally it works like a champ. If I run it through "localhost:xxx.html I get that infamous "Unable to connect to MySQL on localhost:3306, are you sure it's running..Java.security.accesscontrol exception. One problem mentioned setting a policy..didn't mention which one though. So I set socket connection priv on localhost:3306 as that was explicitly mentioned in the exception. Seemed like a good idea. It was but still did not solve the problem. So what I think would be really swell is if in one place there was a really good answer on how to set up an applet using JDBC under IE to work with respect to the security manager. Could someone please help?
    Thanks in Advance,
    Walt

    Hi,
    Let's first c an example of the intended functions of the two methods.
    We have an HTML-type document, "document.html" at:
    host_name/some_directory/document.html
    and we have our applet, "OurApplet.class" at:
    host_name/some_directory/applets/OurApplet.class
    In the "document.html", we have embedded "OurApplet.class" inside. Then getDocumentBase().toString() should supposedly be:
    host_name/some_directory/document.html
    and getCodeBase().toString() should supposedly be:
    host_name/some_directory/applets/OurApplet.class
    If the directories containing the HTML document and the applet were the same, both methods would give the same thing; if they r not, it'd be like the above.
    Ok, the above is the way they'r intended to be. According to the bug ChuckBing has shown us (actually the methods r under the class java.applet.Applet instead of under the package java.applet), the two methods however produce what their counterpart friends is supposed to produce. So if your version of SDK/JRE produces the bugged version of the output, u can replace the method with its counterpart friend. However, keep in mind of the target JRE the applet will be run on and the possibility of more than one potential audience JREs.

Maybe you are looking for

  • How to migrate Oracle 9i(32 bit) to oracle 10g(64 bit) DB with ASM

    How to migrate Oracle 9i(32 bit) to oracle 10g(64 bit) DB with ASM on SAME platform RHEL4.0 Scenario My case: 1) DB size 400G. 2) Minimum downtime. 3) oracle 9i(9.2.0.4) source DB. 4) oracle 10g(10.2.0.3) target DB with ASM. 5) Source DB (HOST A) and

  • E71 shows "Installing" when it's turned on

    Hi *, I have a problem, please help me because it's annoying When I turn on the phone, after the main screen appears, it always says "Installing..." and, after some seconds, the screen says "Unable to install because it's not secure blabla"... The pr

  • How to run a makefile from java app?

    Hi, I want to run a make command the first time my java swing application is run. The makefile is in a directory that the application is using for input files. Do I need to write a script to house the make command or is there another way to run make?

  • Javascript import statements

    Hi all, <code> import java.awt.*; import javax.script.*; import javax.swing.*; class c public static void main (String...args) ScriptEngine Engine; Engine = new ScriptEngineManager().getEngineByName ( "JavaScript" ); try { Engine.put ( "button", new

  • Can't  activate iMessage for my phone number.

    Can't even activate iMessage for my phone number but it constantly charging me every time am trying to activate it. Same with Facetime but can use with Apple id Help Please!!!