This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
i hav developed a banking application using servlets - jdbc. when the account holder enters the servlet he gives his acc no and password on the basis of which he performs his deposit and withdrawal operations. i dont want subsequent users or the same user from the same browser to see the transactions he has done. how do igo about it
You can set the header from the servlet before you write out anything to the client to effectivly remove any cached pages. response.setHeader("Cache-Control", "no-cache"); response.setHeader("Expires", "Thu, 01 Dec 1994 16:00:00 GMT"); This will not allow the use of the browser's back button (actually, you can use the back button all you want but you'll have to refresh to see any content). Sean
Bhupender, Wouldn't this little trick just solve the above problem for only one click, but a user could then look at the back button's history list or even just click back twice and get around the trick? OP
Joined: Dec 01, 2000
yes of course it will work for only one back.. something is better than nothing don't u think so??? Bhupendra
Joined: Jan 31, 2000
Yes. We can make it harder for the user to go back but not impossible. regds maha anna