My question is simple - how to implement login-logout in servlet jsp?
Following is the use case...
- I have a users table in DB with email,username and password
- I have a mapped bean object - User in java having email,username,password properties
- Simply I want to login by validating email and password BUT
- Once I login and then logout, when I click on back button, it should not retain the session.
- It should not give any warning BUT simply should ask for login
- If I copy-paste restricted resource's link, it should ask for login
What all solutions I've gone through...
- Some say to implement tomcat security using roles and bla bla... BUt I think I should not set username, passwords in some tomcat config file. Bcz the details are in DB table
- Some ask to implement no-cache, pragma bla bla... but never work
- Back button disable is foolish thing
**
What Help I am expecting from you guys ...?
**
- Is there any third-party API available to do this?
- How things are implemented in production ready applications ?
- Should I use JAAS, or any other security process for exactly above mentioned scenario OR WHAT
- Please give me some hint or solution how I should proceed implementing production ready login-logout in servlet-jsp
I've searched on internet but end up with simple Login examples or tomcat security roles etc. No one gives the actual solution. ANd please don't say that this question is NOT RELATED TO this FORUM.
Thanks