Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-12-2007, 06:43 PM
Member
 
Join Date: Dec 2007
Location: India
Posts: 11
asifsolkar is on a distinguished road
jeditorpane help parsing html
I am developing an application which needs a web browser functionality like Mozilla or internet explorer.

I have tried several examples of displaying web pages in jEditorPane but it doesnt seem to work well for me

I am doing my development in netbeans 6.0 here is the code

Code:
private void jEdpaneBrowserHyperlinkUpdate(javax.swing.event.HyperlinkEvent evt) { HyperlinkEvent.EventType type= evt.getEventType(); final URL url = evt.getURL(); if (type == HyperlinkEvent.EventType.ENTERED) { System.out.println("URL: " + url); }else if (type == HyperlinkEvent.EventType.ACTIVATED) { System.out.println("Activated"); EditorKit htmlKit = jEdpaneBrowser.getEditorKitForContentType("text/html"); HTMLDocument doc = (HTMLDocument) htmlKit.createDefaultDocument(); jEdpaneBrowser.setEditorKit(htmlKit); try { InputStream in = url.openStream(); //jEdpaneBrowser.setPage(url); jEdpaneBrowser.read(in, doc); in.close(); // set the combo } catch (IOException ioException) { System.out.println("Error following link" + ioException); jEdpaneBrowser.setDocument(doc); } }
but this code doesnt load pages properly like internet explorer or Mozilla
the pages that dont load are Google , Yahoo! etc

Flash pages are set blank nothing loads..

yahoo recomends me to upgrade the browser i feel jeditorpane cannot render html like InternetExplorer or Mozilla

Please help how can render this html , is there any html renderer which can help me do this .
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-12-2007, 09:21 PM
Senior Member
 
Join Date: Nov 2007
Location: Newport, WA
Posts: 141
staykovmarin is on a distinguished road
Java CANT render flash, thats why you dont see anything. The only way i have read is about using a quicktime wrapper, since quicktime can use flash.

Quote:
yahoo recomends me to upgrade the browser
Of course it will, since you are NOT using Internet Explorer, or Mozilla. Nor are you sending a message to the website, to trick it to think that you are a different browser. Unfortunately i dont remember how i did that (it was about 2 years ago) but i am sure you can find it trough a little bit of googling
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 12-13-2007, 07:46 AM
Member
 
Join Date: Dec 2007
Location: India
Posts: 11
asifsolkar is on a distinguished road
thanks staykovmarin for your reply i have tried Lobo browser which is an open source . they have used cobra 0.97.4 to parse the html so its able to load google.com properly , but not flash site Flash Template # 17616 by Hugo . even lobo browser built on the similar framework does not load flash site . is there any html render which can do this
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 12-13-2007, 11:00 AM
Senior Member
 
Join Date: Nov 2007
Location: Newport, WA
Posts: 141
staykovmarin is on a distinguished road
Its not the HTML renderer that's the problem. Flash uses its own language/interpreter. They used to make it for java, but that stopped back in flash2. Like i said, there might be some solution using Quicktime, since Quicktime can interpret flash.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 12-14-2007, 06:23 AM
Member
 
Join Date: Dec 2007
Location: India
Posts: 11
asifsolkar is on a distinguished road
I just did some study on the reference browser software which is made in java and loads the pages well just like Internet Explorer does

to check some info on the browsers ,I did the following test
Browser Security Test

and found that Internet Explorer and this Java Software browser are identical

the Result of Internet Explorer 7

Your browser reports to be: "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; .NET CLR 1.1.4322; FDM; .NET CLR 3.5.21022)"

Browser name: MSIE
Version: 7.0
Platform: Windows Vista

Result of the Java Browser is

Your browser reports to be: "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; .NET CLR 1.1.4322; FDM; .NET CLR 3.5.21022)"

Browser name: MSIE
Version: 7.0
Platform: Windows Vista


Result on Mozilla Firefox

Your browser reports to be: "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11"
Browser name: Firefox
Version: 2.0.0.11
Platform: Windows Vista


What does this mean can i use IE dll to make my browser in java , how can this be done please help i feel i am closer to my target

Thanks
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Hide the titlebar of a JEditorPane Eranga AWT / Swing 1 03-28-2008 11:28 AM
Copy n' Paste in JEditorPane wraps text in new css..? Sam AWT / Swing 0 02-06-2008 04:55 PM
JEditorPane drmmr11 Java Applets 0 08-02-2007 07:08 PM
Adding custom highlight to JEditorPane andrewb AWT / Swing 0 06-22-2007 07:48 PM
html web page parsing/scraping orchid Advanced Java 1 05-02-2007 04:35 AM


All times are GMT +3. The time now is 07:02 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org