This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes difference between contents of view source of a web page and url stream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "difference between contents of view source of a web page and url stream" Watch "difference between contents of view source of a web page and url stream" New topic
Author

difference between contents of view source of a web page and url stream

nandini lagunia
Ranch Hand

Joined: May 05, 2009
Posts: 57
Hi,

I am trying to fetch the contents of a web page programmatically by using java.net.URL class. After opening the stream for the url, I am able to read the contents. I am of the opinion that this content should exactly be same as the contents of the page source.

Am I wrong? If yes, then what are the differences between those two contents?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13864
    
  10

You are not wrong.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
nandini lagunia
Ranch Hand

Joined: May 05, 2009
Posts: 57
Jesper de Jong wrote:You are not wrong.


Then why are the contents not equal?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60041
    
  65

Making us guess what the differences are isn't going to get you much help.



[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
nandini lagunia
Ranch Hand

Joined: May 05, 2009
Posts: 57
Bear Bibeault wrote:Making us guess what the differences are isn't going to get you much help.


lol...
Right!!!

Shall I paste both the contents?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60041
    
  65

How about just pointing out the significant differences?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: difference between contents of view source of a web page and url stream
 
Similar Threads
How to read a web page.
Interesting Problem
How to Retreive Meta-Tags
SocketException ?
Problem reading in all contents of a webpage using url.openstream()