Tracking number of JSPs a user visits in a session
Hi everyone:
My coworkers and I need to track the number of pages a user visits while visiting our site.
We set a cookie in the login servlet. If they're not logged in and they visit 5 pages, we want to redirect their request for a 6th JSP to "pleaseLogIn.jsp." Here's the problem:
1 -- We want to avoid the following solution: Set a cookie with an int, retrieve that int on
each page, increment it, and reset the cookie with the incremented int. Then, if the int==5,
redirect. This solution would mean putting (or including) the same code onto each page.
2 -- We can't extend our JSP loader (which, in this case, is BEA Weblogic 5.1's loader --
weblogic.servlet.JSPServlet) to track and redirect, because this servlet is private and unsupported.
Given these 2 limitations, does anyone out there have a clever solution? Thanks a million -- Matt

