Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / June 2006

Tip: Looking for answers? Try searching our database.

Website Status

Thread view: 
trpost@gmail.com - 27 Jun 2006 20:59 GMT
I am looking to create a small Java application that will take a URL
and display the status as well as some statistics about the page
download speed and page size, but am having trouble getting started. It
looks like I can gather a rudimentary page status with
org.apache.commons.httpclient.*; but am not sure how to gather the
other information mentioned above. Has anyone done something similar,
or come across some code where this has been done.

Thanks
andrewthommo@gmail.com - 28 Jun 2006 15:59 GMT
> I am looking to create a small Java application that will take a URL
> and display the status

*

> as well as some statistics about the page
> download speed

This is especially arbitrary information that depends
on a lot of factors, including the user's connection speed,
local caching, network(s) usage and host server speed. *

> ..and page size,

http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLConnection.html
..is your friend for the page size, as well as other
useful information.

>...but am having trouble getting started.

* ..but URLconnectrion also has a method to getContent,
so if you time how long it takes to get the content, you can
divide that time into the size to get an idea of the download
speed of this page for this user (at this moment in time).

Also, attempting to openConnection() or getInputStream()
should tell youthe page status as far as 'available/off-line' -
but be careful as the 'page found' might be a '404' status
(page not found) web-page.  

HTH

Andrew T.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.