tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Navarro, Jose" <>
Subject JSP - How do I make it invisible to the browser's "back" button?
Date Thu, 25 Oct 2001 12:28:56 GMT

I have developed a JSP page which in turns invokes a servlet used to keep
track of the number of times a certain page in my web is visited.

In other words, when I have a link to some page, I do not link the target
page directly but execute the JSP instead. More or less it goes this way:

desired/URL.htm" target="_self">Text of the link</a></p>

(here, "thisorthatpage" stands for an achronim that is stored in my hits
database and that identifies the page being visited).

So when the user clicks on the link, he or she is redirected to the jsp page
which invokes the counter servlet and then redirects the user to the target
(destination) page.

The problem is that the jsp is stored in the browser's list of visited
pages. If then the user wants to go back and clicks on the corresponding
browser's button, the jsp page is executed again and he is redirected one
more time to the same page. The feeling, therefore, is that the back button
doesn't work at all.

Then it would be very interesting to remove the jsp URL from the browser's
access list, so the consequence would be that it would be "invisible" to the
back command. Well, I hope that it is possible to access this list of
visited pages from the jsp code and remove its own entry.

Is this possible? If so, can you tell me how? If not, do you know any other
way to implement it?

Thanks alot for your help!



View raw message