This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]
Thanks Brad.

Another solution I have is
when someone first enters the site he doesn't have a session, increment the
counter,  and  add a session to the request.
Something like this in servlet

static int counter =0;

public void service() {
    HttpSession sess =null;
    if ((sess = req.getSession(false)) != null) {
        // user has already a session --> has already incremented the
counter
    } else {
        counter += 1;
        sess = req.getSession(true);    // add session to req
    }
}

Rizwan

-----Original Message-----
From: Brad Stone [mailto:brad@bvstools.com]
Sent: Monday, October 22, 2001 2:18 PM
To: web400@midrange.com
Subject: Re: [WEB400] Counting hit rates from servlet more accurately!!

Check the referrer.  If it's your own site, then don't count
it as a hit.

Brad
www.bvstools.com

On Mon, 22 Oct 2001 07:42:22 +0300
 Rizwan Ahmed <rizwan@nscsa.com.sa> wrote:
> This message is in MIME format. Since your mail reader
> does not understand
> this format, some or all of this message may not be
> legible.
> --
> [ Picked text/plain from multipart/alternative ]
> Hi Group
>
> I have a servlet customized which does some kind of
> monitoring page hits and
> storing  it to a database(coolservlets.com).My issue is
> the servlet
> increments the counter for a 'refresh' of the site as
> opposed to increment
> for a new browser session as is the case with available
> free counters
> (thecounter.com)
>
> I've gone through an article in webmonkey about tracking
> but doesn't seem to
> provide any details.
>
> Since I am unable to think complex in java I'll be happy
> If someone could help me with sources for me to analyze.
>
> Thanks
> TIA
> Rizwan
>
>
>
>
>
> _______________________________________________
> This is the Web Enabling the AS400 / iSeries (WEB400)
> mailing list
> To post a message email: WEB400@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/web400
> or email: WEB400-request@midrange.com
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/web400.
> _______________________________________________
> This is the Web Enabling the AS400 / iSeries (WEB400)
> mailing list
> To post a message email: WEB400@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/web400
> or email: WEB400-request@midrange.com
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/web400.
>

Bradley V. Stone
BVS.Tools
www.bvstools.com
_______________________________________________
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/web400
or email: WEB400-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.