This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Flying Through a page...reading the content... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Flying Through a page...reading the content..." Watch "Flying Through a page...reading the content..." New topic

Flying Through a page...reading the content...

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 761

I want to do something like,

Request for perticuler page.. than read the contents of that page... store it somewhere in a String variable

than search for perticuler name value pair in that string if the value is grater than perticuler value than that value will be mailed to perticuler person.

how do i do it ?

The Page which i want to request is http://localhost:8080/status

The String which i want to store is

The name value pair which i want to search in the string is

And if the value is grater than 70 than mail should go to System Admin

Please Advice me on same...I know how to request the page and how to send mail but i dont have any idea of how to read the content of the page...

The application should check the Thread Value every 5 mins... that can be done by putting the delay...or some michenism...

Jigar Naik

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Try a Google search with keywords "Screen Scrape" or "screenscrape"

Moving to Sockets and Internet Protocols (not a servlet question).

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
vu lee
Ranch Hand

Joined: Apr 19, 2005
Posts: 195
One way to do this is to create a URLConnection, connect, get the InputStream, wrap the stream by the BufferedReader, and search for the key as a line is read.
I agree. Here's the link:
subject: Flying Through a page...reading the content...
It's not a secret anymore!