FULL PRODUCT VERSION : Java(TM) SE Runtime Environment (build 1.6.0_10-rc-b27) Java HotSpot(TM) Client VM (build 11.0-b14, mixed mode, sharing) ADDITIONAL OS VERSION INFORMATION : Microsoft Windows [Version 6.0.6001] A DESCRIPTION OF THE PROBLEM : AppletContext.showDocument fails silently in IE7 if target contains hyphens. If you disable the new plugin architecture in the java control panel then it works. REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- import java.awt.*; import java.awt.event.*; import java.applet.Applet; import java.net.*; public class ShowDocument extends Applet implements ActionListener { public ShowDocument () { Panel p = new Panel(); p.setLayout( new FlowLayout() ); Button b = new Button( "Works" ); b.addActionListener( this ); p.add( b ); b = new Button( "Does Not Work" ); b.addActionListener( this ); p.add( b ); add( "Center", p ); } public void actionPerformed ( ActionEvent e ) { String command = e.getActionCommand(); URL url = null; try { url = new URL( "http://www.google.com" ); } catch ( MalformedURLException ex ) { throw new Error( ex ); } if ( "Works".equals( command ) ) { String target = "works"; getAppletContext().showDocument( url, target ); } else if ( "Does Not Work".equals( command ) ) { String target = "does-not-work"; getAppletContext().showDocument( url, target ); } else { throw new Error( "unknown command: " + command ); } } public static void main ( String args[] ) { Frame f = new Frame( "ShowDocument" ); ShowDocument sd = new ShowDocument(); sd.init(); sd.start(); f.add( "Center", sd ); f.setSize(300, 100); f.show(); } public String getAppletInfo() { return "Demonstrates that some frame targets do not work with IE 7.0.6001 and Java 1.6u10 and new plugin."; } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : Don't put hyphens in your targets?!
|