Servertec Page Counter Servlet
Content
Introduction
Release Notes
Features
FAQs
Requirements
Installation
How To
Change Log
Future Plans
Knowledge Base
Documentation
Examples
Hello World
Display Arguments
Display Headers
URL Redirect
CGI Tester
SSI Tester
Servlet Tag
Servlet Chaining
Log
Cookie Counter
Cookie Tester
Protected Page
List Employees
Connection Pool
Simple Form
Dump Form
Page Counter
File Upload
Session Tester
Context Tester
C++ .NET
C# .NET
J# .NET
Visual Basic .NET
JavaServer Pages
Legal
Contact Us

 

This example displays:
This page was accessed count times.

Where count is the number of times this page was hit.

Clicking on refresh will cause the page to be redisplayed and the counter to increment.

The counter is stored in a file page_counters on the Web Server. If an entry does not exist, then an entry set to 1 is created in the file.

This example uses PageCounterServlet to do the actual work and return the value to display in the generated Web page.

[ view source ] [ run ]

 top of page
Copyright © 1998-2005 Servertec. All rights reserved.
Privacy Statement.
Last Modified: Sun Sep 04 14:57:20 EDT 2005