Just enter a web page and enter this statement into the address bar than see what you 
get --->
javascript:alert(document.links.length);       :0)

Good luck
Fırat



shankar wrote:

> shankar wrote:
>
> > Your code is not running.I can't import  the WebConversation and WebResponce class
> >
> > Please ....
> > Russell Gold wrote:
> >
> > > I  want to count the number of hrefs in one html file
> > >
> > > I assume you don't mean a static file that you can look at by hand? (That would 
>be too easy)
> > >
> > > If you mean that you want to do it dynamically, try HttpUnit 
><http://httpunit.sourceforge.net>:
> > >
> > > WebConversation wc = new WebConversation();
> > > WebResponse wr = wc.getResponse( "http://..." );
> > > int numHrefs = wr.getLinks().length;
> > >
> > > Pretty simple.
> > >
> > > ------------------------------------------------------------------------
> > > Russell Gold                     | "... society is tradition and order
> > > [EMAIL PROTECTED]    (preferred)  | and reverence, not a series of cheap
> > > [EMAIL PROTECTED]              | bargains between selfish interests."
> > > [EMAIL PROTECTED]       |   - Poul Anderson, "Iron"
> > >
> > > ___________________________________________________________________________
> > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> > > of the message "signoff SERVLET-INTEREST".
> > >
> > > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > > Resources: http://java.sun.com/products/servlet/external-resources.html
> > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
> > ___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to