Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to retrieve a html file from a URL

 
nian zhang
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could you give me the piece of code to do that?

Thanks a lot.

zhangnian
 
Eddy Lee Sin Ti
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Check out more on JSTL
Article
 
nian zhang
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Eddy Lee Sin Ti:


Check out more on JSTL
Article


Hi, thanks for your reply. But I don't understand what's the tag used here. As far as I know(did similar project 3 years ago), there are some kind of classes could be used to retrieve the html file from a given URL.
But,I don't quite remember now. So anyone can give me a hint?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean when you say "retieve" an HTML file?
Are you just trying to view a webpage?
If so, just create a link to it.

Please explain what you are trying to do?
 
nian zhang
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Souther:
What do you mean when you say "retieve" an HTML file?
Are you just trying to view a webpage?
If so, just create a link to it.

Please explain what you are trying to do?


i m going to get the html file as a string or stringbuffer, and do futher processing, such as extracting links, etc.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65535
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, you want to "screen scrape".

Check out the openConnection() method of java.net.URL.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!