Re: Applet runs fine Pre IE 7 Now errors

Discussion in 'Java' started by Andrew Thompson, Aug 29, 2006.

  1. Baillie wrote:
    ....
    > Here is a link that you can use to see the problem.


    I cross-posted this to comp.lang.java.programmer.
    Note that I have directed Follow-Ups to c.l.j.help only,
    please set follow-ups as you see appropriate.

    For those who have just joined this thread, the OP
    has an applet that is failing in IE7. I thought it was
    the Eolas patent thing, but that should not apply to
    scripted applets - as I understand these to be.

    Any thoughts?

    > http://199.185.13.60/gems
    >
    > LoginID is: a Password is: a


    And to the OP.. SheeEEEsh.. the only reason I don't bother
    saying 'and make sure we don't have to jump through hoops
    to see the applet' is because I thought it was 'intuitively obvious'..
    my bad.

    And... (see below)

    > Use IE 6 to see what is an administrator applet. As previously
    > mentioned, IE 7 gives the problem.
    >
    > I am able to view other java applets on other web sites using IE 7.
    >
    > Also, here is some code. It's quite a bit, but I did take out what I
    > thought would definately not be required by you (variable declarations,
    > etc). Hopefully, you will see something obvious and not have to spend
    > too much time on it. I'm stumped. It all looks fine to me.
    >
    > I have also include html code from the page that is supposed to fire up
    > the applet right after the applet code.
    >
    > ******** Start Applet Code
    > package gems;
    >
    > import java.applet.AppletContext;
    >
    > import java.io.*;
    > import java.net.MalformedURLException;
    >
    >
    > import javax.swing.*;
    > import javax.swing.event.*;
    > import javax.swing.plaf.TreeUI;
    > import javax.swing.table.*;
    > import javax.swing.tree.*;
    >
    > public class Administrator extends javax.swing.JApplet
    > {
    > // Instance reference to the administrator applet.
    > private static Administrator instance_;
    >
    > public Administrator()
    > {
    > }
    >
    > private void initComponents() {//GEN-BEGIN:initComponents
    > /* ***** removed for demo purposes ***** */
    > }//GEN-END:initComponents
    >
    > static {
    > // Set the look and feel of the applet to that of the system.
    > try {
    >
    > UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    > }
    > catch (Exception ex) {
    > }
    > }
    >
    > public void defineTable( JTable table, char[] inputStream,
    > JToolBar toolbar, ActionListener listener )
    > {
    > DynamicTableModel tableModel = (DynamicTableModel)table.getModel();
    > if ( tableModel.isTableDefined() ) {
    > return;
    > }
    > }
    >
    > public static Administrator getInstance()
    > {
    > return instance_;
    > }
    >
    > public void init()
    > {
    > SecurityManager secMan = System.getSecurityManager();
    > if ( secMan != null ) {
    > try {
    > secMan.checkSystemClipboardAccess();
    > System.out.println( "System clipboard granted" );
    > } catch ( SecurityException se ) {
    > System.out.println( "System clipboard NOT granted" );
    > }
    > }
    >
    > instance_ = this;
    >
    > // Initialize all components.
    > initComponents();
    >
    > try {
    > UIManager.setLookAndFeel(
    > UIManager.getSystemLookAndFeelClassName() );
    > SwingUtilities.updateComponentTreeUI( getContentPane() );
    > }
    > catch ( Exception ex ) {
    > }
    > }
    >
    > public void start()
    > {
    > }
    >
    > public void stop()
    > {
    > }
    >
    > public void showDocument( String documentUrl, String target )
    > throws MalformedURLException
    > {
    > getAppletContext().showDocument( new URL( url_, documentUrl ),
    > target );
    > }
    > }
    >
    > ********* End Applet Code
    >
    > ********* Start HTML Code
    > <HTML>
    > <HEAD>
    > </HEAD>
    > <BODY LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"
    > onUnload="self.close();">
    > <COMMENT>
    > <!-- Only Netscape reads the COMMENT contents -->
    > <SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript1.1">
    > <!--
    > var _ns = ((navigator.appName.indexOf("Netscape")>=0)&&
    > (((_info.indexOf("Win")>0)&&
    > (_info.indexOf("Win16")<0)&&
    >
    > (java.lang.System.getProperty("os.version").indexOf("3.5")<0))||
    > (_info.indexOf("Sun")>0)||
    > (_info.indexOf("Linux")>0)));
    >
    > var _ns6 = ((_ns==true)&&(_info.indexOf("Mozilla/5")>=0));
    > //-->
    > </SCRIPT>
    > </COMMENT>
    > <SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
    > <!--
    > if (_ie==true){
    > document.writeln('<OBJECT
    > classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH="100%"
    > HEIGHT="100%" CODEBASE="/htm/admin/plugin/j2re-1_3_1-win.exe">');
    > document.writeln('<PARAM NAME="sw_session_id"
    > VALUE="'+getCookie('sw_session_id')+'">');
    > document.writeln('<NOEMBED><XMP>');
    > }
    > else if((_ns==true)&&(_ns6==false)){
    > document.writeln('<EMBED
    > sw_session_id="'+getCookie('sw_session_id')+'"
    > TYPE="application/x-java-applet;jpi-version=1.3.1"
    > CODE="gems.Administrator.class" CODEBASE="/htm/admin"
    > ARCHIVE="gems.jar" WIDTH="100%" HEIGHT="100%" SCRIPTABLE="false"
    > pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html">');
    > document.writeln('<NOEMBED><XMP>');
    > }
    > //-->
    > </SCRIPT>
    > <APPLET CODE="gems.Administrator.class" CODEBASE="/htm/admin"
    > ARCHIVE="gems.jar" WIDTH="100%" HEIGHT="100%"></XMP>


    Where on (or off) earth did the <XMP> element come from?
    Have you ever dared validate this page?

    > <PARAM NAME="code" VALUE="gems.Administrator.class">
    > <PARAM NAME="codebase" VALUE="/htm/admin">
    > <PARAM NAME="archive" VALUE="gems.jar">
    > <PARAM NAME="type"
    > VALUE="application/x-java-applet;jpi-version=1.3.1">
    > <PARAM NAME="scriptable" VALUE="false">
    > <PARAM NAME="statistics" VALUE="true">
    > <SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
    > <!--
    > document.writeln('<PARAM NAME="sw_session_id"
    > VALUE="'+getCookie('sw_session_id')+'">');
    > //-->
    > </SCRIPT>
    > </APPLET>
    > </NOEMBED>
    > </EMBED>
    > </OBJECT>
    > </BODY>
    > </HTML>
    >
    > ********* End HTML Code


    Can any of the c.l.j.p. gurus see the problem, here?

    Andrew T.
    Andrew Thompson, Aug 29, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Addison

    Server errors galore, local runs fine

    George Addison, Nov 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    311
    Tommy
    Nov 29, 2003
  2. Replies:
    4
    Views:
    492
    Maett
    Jan 9, 2006
  3. ashjas
    Replies:
    7
    Views:
    339
    ashjas
    Dec 10, 2007
  4. Doug Morse
    Replies:
    10
    Views:
    992
    Thomas Heller
    Mar 16, 2008
  5. Otto __
    Replies:
    1
    Views:
    108
    Robert Klemme
    Oct 13, 2008
Loading...

Share This Page