jasp.webcom
Class PageCounter
java.lang.Object
|
+--jasp.webcom.PageCounter
- public class PageCounter
- extends java.lang.Object
The Page Counter component creates a PageCounter object that
counts and displays the number of times a Web page has been
opened. At regular intervals the object writes the number of
hits to a text file so that in the event of a server shutdown,
the data is not lost. The Page Counter component uses an
internal Central Management object to record how many times
each page in the application has been opened.
Constructor Summary |
PageCounter()
Creates a PageCounter object that counts and displays the number of times a Web page has been opened |
Method Summary |
int |
Hits()
The Hits method returns the number of times that a specified
Web page has been opened. |
int |
Hits(java.lang.String pathInfo)
The Hits method returns the number of times that a specified
Web page has been opened. |
void |
PageHit()
The PageHit method increments the hit count for the current Web page. |
void |
Reset()
The Reset method sets the hit count for a specified Web page to 0. |
void |
Reset(java.lang.String url)
The Reset method sets the hit count for a specified Web page to 0. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PageCounter
public PageCounter()
- Creates a PageCounter object that counts and displays the number of times a Web page has been opened
- Parameters:
server
- the jasp.buildin.server object
Hits
public int Hits()
- The Hits method returns the number of times that a specified
Web page has been opened.
- Returns:
- A LONG indicating the number of times that the specified
Web page has been opened.
Hits
public int Hits(java.lang.String pathInfo)
- The Hits method returns the number of times that a specified
Web page has been opened.
- Parameters:
pathInfo
- Specifies the PATH_INFO of the Web page using
the format /virtualdirectoryname/filename.asp. If this parameter
is not specified, the hit count for the current page is displayed.- Returns:
- A LONG indicating the number of times that the specified
Web page has been opened.
PageHit
public void PageHit()
- The PageHit method increments the hit count for the current Web page.
Reset
public void Reset()
- The Reset method sets the hit count for a specified Web page to 0.
Reset
public void Reset(java.lang.String url)
- The Reset method sets the hit count for a specified Web page to 0.
- Parameters:
pathInfo
- Specifies the PATH_INFO of the Web page using the format
/virtualdirectoryname/filename.asp.