Hello, I am using JEditorPane to display a dynamic HTML with charset encoding meta tag in the header. Because of this meta tag, the page gets requested twice from the server and invokes my servlet to run twice. �f I make the JEditorPane previous page of the same encoding, then I get an exception as: //------------------------ java.lang.NullPointerException at javax.swing.text.html.StyleSheet.getRule(Unknown Source) at javax.swing.text.html.StyleSheet$ViewAttributeSet.<init>(Unknown Source) at javax.swing.text.html.StyleSheet.getViewAttributes(Unknown Source) at javax.swing.text.html.BlockView.setPropertiesFromAttributes(Unknown Source) at javax.swing.text.html.BlockView.setParent(Unknown Source) at javax.swing.plaf.basic.BasicTextUI$RootView.setView(Unknown Source) at javax.swing.plaf.basic.BasicTextUI.setView(Unknown Source) at javax.swing.plaf.basic.BasicTextUI.modelChanged(Unknown Source) at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.propertyChange(Unknown Source) at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unknown Source) at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unknown Source) at javax.swing.JComponent.firePropertyChange(Unknown Source) at javax.swing.text.JTextComponent.setDocument(Unknown Source) at javax.swing.JEditorPane.setPage(Unknown Source) //--------------------
The only way around this I saw was to remove the meta tag from the html but then, viewing the page from a browser other than the JEditorPane will not have the correct charset for the page. The source code shows that there is a ignoreCharset flag that gets used the second time the same URL is requested. But I think that gets used by the new document that is internal to the setPage call. Any ideas on how to keep the meta-tag in the html but still be able to display using JEditorPane? For info, running Plugin 1.3.1 on IE5.x on WinNT4.0. Thanks, Nuri _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp _______________________________________________ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing
