Thanks that worked. Simplified the code a bit as didn't need to make connection:
Code:
public void showHTML(String p_strHTML)
{
try
{
MyThread thread = new MyThread(p_strHTML);
thread.start();
}
catch(Exception e)
{
}
}
private static class MyThread extends Thread
{
String m_strHTML;
public MyThread(String p_strHTML)
{
m_strHTML=p_strHTML;
}
public void run()
{
try
{
ByteArrayOutputStream output = new ByteArrayOutputStream();
Base64OutputStream boutput = new Base64OutputStream( output );
output.write( "data:text/html;base64,".getBytes() );
boutput.write( m_strHTML.getBytes() );
boutput.flush();
boutput.close();
output.flush();
output.close();
BrowserSession bSession = Browser.getDefaultSession();
bSession.displayPage( output.toString() );
}
catch( Exception e )
{
System.out.println( "Exception: " + e );
}
}
} I did try to take it one stage further and display within a control using BrowserContentBaseImpl. But didn't have much success.