Hi..I wish to prevent users from entering the web pages of my application again using back button once they've logged out.How can i achieve this?..I do not wish to use no-cache,history() etc as they're not fool proof.
Also i want to know how can i prevent users from directly entering the web page by giving its url in the address bar i.e. if such an attempt is made then user must be redirected to the login page.I am using jsp and java.Thx
Ankita B
2
Light Poster
Recommended Answers
Jump to PostHave a look at the Javaworld article 'Solving the logout problem elegantly' to get a fair idea of how to go about doing things.
Jump to PostYou invalidate the session. I would have to look up how to do it in JSP myself, but if your using a servlet, or a filter to accomplish the logout, then that is going to be Java code, and there it is
yourHttpSessionVariable.invalidate();
I hope your not …
All 7 Replies
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
Sulley's Boo
commented:
riiiiiiiiiiight
+5
Ankita B
2
Light Poster
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
Sulley's Boo
commented:
You are a star :cool:
+5
Ankita B
2
Light Poster
nikk
0
Light Poster
jc364
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.