JDK-4202127 : JEditorPane does not properly display HTML content in JApplet
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.6,windows_nt
  • CPU: x86,sparc
  • Submitted: 1999-01-11
  • Updated: 1999-04-01
  • Resolved: 1999-04-01
Related Reports
Duplicate :  
Description

Name: dbT83986			Date: 01/11/99


1. Compile the applet source shown below:

import javax.swing.*;

public class TestHtml extends JApplet
{

    public void init()
    {
 try {
     JEditorPane e = new JEditorPane(getParameter("url"));
     e.setEditable(false);

     getContentPane().add(e);
 } catch(java.io.IOException e) {
     e.printStackTrace();
 }
}

2. Set the url parameter below to any http URL:
<html>
<head>
    <title>HTML bug</title>
</head>
<body>
<center>
<APPLET  NAME="TestHtml" CODE = "TestHtml"
WIDTH = 500 HEIGHT = 500 >
<PARAM name="url" value="Any http URL here">
</APPLET>
</center>
</body>
</html>

3. Run the above applet.

4. The HTML is not displayed correctly. It is totally 
   garbled. 

Example HTML file tha tis garbled:

<html>
<head>
    <title>Test</title>
</head>
<body>
<h1>test</h1>
<ul>
        <li> one </li>
        <li> two </li>
</ul>
</body>
</html>
(Review ID: 52362)
======================================================================

Comments
WORK AROUND Name: dbT83986 Date: 01/11/99 None ======================================================================
11-06-2004

EVALUATION This was due to the security manager changes for 1.2. The resources needed to configure the html support were throwing security exceptions. timothy.prinzing@eng 1999-03-31
31-03-1999