How to find the number of hits on button in a web page using JSP?

Nikumbh

Nikumbh

@nikumbh-lmTCgS Oct 26, 2024
how to find the no. of hits on button in a web page using jsp. The no. of hits has to be started with the last hit that has been made by the user. Could anyone please help. Well, Thanks in advance.

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Anoop Kumar

    Anoop Kumar

    @anoop-kumar-GDGRCn Jun 18, 2013

    Look like you need to use application implicit object. which is object of ServletContext ,
    here is simple tutorial given for page counter, looks ok and should work.
    <a href="https://www.tutorialspoint.com/jsp/jsp_hits_counter.htm" target="_blank" rel="nofollow noopener noreferrer">JSP - Hits Counter</a>

    Do you want to use across session? then you need to save counter in database before session end.
  • Nikumbh

    Nikumbh

    @nikumbh-lmTCgS Jun 20, 2013

    #-Link-Snipped-# : Thank you buddy. Well got the idea what i'am looking for...