This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading the contents in jsp  RSS feed

 
Zoram Paul
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear friends,

Can anyone give me some idea of how to read the content of a page in jsp?

Like I want to read the content(as shown while viewing it in the web browser) of index.html(and not the codes and tags of the index.html) in the website

http://abbeyworkshop.com/howto/java/readFile/index.html

Please if anyone can provide me with some valuable suggestions.



Thanking you,
 
Brad Smiths
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're probably better off moving that code to a servlet, otherwise your app will be difficult to maintain. In any case, you can easily read the contents of any page using the Apache Commons HTTP library:

http://jakarta.apache.org/httpcomponents/httpclient-3.x/methods.html
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!