This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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
Author

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

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 753
hi,

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
Sheriff

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: 189
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: http://aspose.com/file-tools
 
subject: Flying Through a page...reading the content...
 
Similar Threads
Flying Through a page...reading the content...
Tomcat and HPUX issue
Java Library for getting jboss server information...
Getting The Current thread busy
How to deal with slow client connections?