Database Visit Counter
Write a Servlet which displays a message and also displays how many times the message has been displayed (how many times the page has been visited).
Hint: Create a file which will update the counter each and every time the page is being loaded.
(Using Database Connection)
Step 1: Create a database with name database.mdb , Table name dbCounter , Column name counter with type numeric and add dsn with name db_count.
Step 2: Create VisitCounter.java servlet file which can interact with database for fetching and update counter value.
Step 2: Create VisitCounter.java servlet file which can interact with database for fetching and update counter value.
Step 3: Create WEB.XML file for Mapping Servlet file.
No comments:
Post a Comment